+ @grml_flavour: name of grml flavour the configuration should be generated for
+ @device: device/partition where bootloader should be installed to
+ @target: path of bootloader's configuration files"""
+
+ if options.skipsyslinuxconfig:
+ logging.info("Skipping generation of syslinux configuration as requested.")
+ else:
+ try:
+ handle_syslinux_config(grml_flavour, target)
+ except CriticalException, error:
+ logging.critical("Fatal: %s" % error)
+ sys.exit(1)
+
+ if options.skipgrubconfig:
+ logging.info("Skipping generation of grub configuration as requested.")
+ else:
+ try:
+ handle_grub_config(grml_flavour, device, target)
+ except CriticalException, error:
+ logging.critical("Fatal: %s" % error)
+ sys.exit(1)
+
+def handle_dir(live_image, device):
+ """Main logic for copying files of the currently running grml system.
+
+ @live_image: directory where currently running live system resides (usually /live/image)
+ @device: partition where the specified ISO should be installed to"""
+
+ logging.info("Using %s as install base" % live_image)
+
+ if os.path.isdir(device):
+ logging.info("Specified target is a directory, therefore not mounting.")
+ device_mountpoint = device
+ remove_device_mountpoint = False