- for filename in 'addons.cfg', 'default.cfg', 'distri.cfg', 'hidden.cfg', 'grml.cfg', 'grml.png', 'hd.cfg', 'isoprompt.cfg', 'options.cfg','vesamenu.c32', 'vesamenu.cfg', 'grml.png':
- path = search_file(filename, iso_mount)
- exec_rsync(path, syslinux_target + filename)
+ for ffile in ['f%d' % number for number in range(1, 11) ]:
+ search_and_copy(ffile, iso_mount, syslinux_target + ffile)
+
+ loopback_cfg = search_file("loopback.cfg", iso_mount)
+ if loopback_cfg:
+ directory = os.path.dirname(loopback_cfg)
+ directory = directory.replace(iso_mount, "")
+ mkdir(os.path.join(target, directory))
+ exec_rsync(loopback_cfg, target + os.path.sep + directory)
+
+ # avoid the "file is read only, overwrite anyway (y/n) ?" question
+ # of mtools by syslinux ("mmove -D o -D O s:/ldlinux.sys $target_file")
+ if os.path.isfile(syslinux_target + 'ldlinux.sys'):
+ os.unlink(syslinux_target + 'ldlinux.sys')
+
+ (source_dir, name) = get_defaults_file(iso_mount, GRML_DEFAULT, "default.cfg")
+ (source_dir, defaults_file) = get_defaults_file(iso_mount, GRML_DEFAULT, "grml.cfg")
+
+ if not source_dir:
+ logging.critical("Fatal: file default.cfg could not be found.")
+ logging.critical("Note: this grml2usb version requires an ISO generated by grml-live >=0.9.24 ...")
+ logging.critical(" ... either use grml releases >=2009.10 or switch to an older grml2usb version.")
+ logging.critical(" Please visit http://grml.org/grml2usb/#grml2usb-compat for further information.")
+ raise
+
+ for expr in name, 'distri.cfg', \
+ defaults_file, 'grml.png', 'hd.cfg', 'isolinux.cfg', 'isolinux.bin', \
+ 'isoprompt.cfg', 'options.cfg', \
+ 'prompt.cfg', 'vesamenu.c32', 'vesamenu.cfg', 'grml.png', '*.c32':
+ glob_and_copy(iso_mount + source_dir + expr, syslinux_target)
+
+ # copy the addons_*.cfg file to the new syslinux directory
+ glob_and_copy(iso_mount + source_dir + 'addon*.cfg', syslinux_target)
+
+ search_and_copy('hidden.cfg', iso_mount + source_dir, syslinux_target + "new_" + 'hidden.cfg')
+