import glob
# global variables
-PROG_VERSION = "0.9.17-pre1"
+PROG_VERSION = "0.9.18"
MOUNTED = set() # register mountpoints
TMPFILES = set() # register tmpfiles
DATESTAMP = time.mktime(datetime.datetime.now().timetuple()) # unique identifier for syslinux.cfg
raise CriticalException("Failed to read device %s"
" (wrong UID/permissions or device/directory not present?)" % partition)
- if options.syslinux and filesystem != "vfat":
+ if filesystem != "vfat":
raise CriticalException("Partition %s does not contain a FAT16 filesystem. (Use --fat16 or run mkfs.vfat %s)" % (partition, partition))
except OSError:
if os.path.isfile("/usr/share/grub/ascii.pf2"):
exec_rsync('/usr/share/grub/ascii.pf2', grub_target + 'ascii.pf2')
+ # always copy grub content as it might be useful
+ for file in glob.glob(iso_mount + '/boot/grub/*.mod'):
+ exec_rsync(file, grub_target)
+
+ for file in glob.glob(iso_mount + '/boot/grub/*.img'):
+ exec_rsync(file, grub_target)
+
+ for file in glob.glob(iso_mount + '/boot/grub/stage*'):
+ exec_rsync(file, grub_target)
def install_iso_files(grml_flavour, iso_mount, device, target):
"""Copy files from ISO to given target
# * catch "install: .. No space left on device" & CO
if options.dryrun:
+ global GRML_DEFAULT
+ GRML_DEFAULT = grml_flavour
return 0
elif not options.bootloaderonly:
logging.info("Copying files. This might take a while....")
# check for vfat filesystem
if device is not None and not os.path.isdir(device):
try:
- check_for_fat(device)
+ if options.syslinux: check_for_fat(device)
except CriticalException, error:
logging.critical("Execution failed: %s", error)
sys.exit(1)
if options.dryrun:
logging.info("Running in simulation mode as requested via option dry-run.")
+ if options.grubmbr and not options.grub:
+ logging.critical("Error: --grub-mbr requires --grub option.")
+ sys.exit(1)
+
# specified arguments
device = args[len(args) - 1]
isos = args[0:len(args) - 1]