Add check for older ISOs which do not ship default.cfg
authorMichael Prokop <mika@grml.org>
Sun, 18 Oct 2009 22:53:32 +0000 (00:53 +0200)
committerMichael Prokop <mika@grml.org>
Sun, 18 Oct 2009 22:53:32 +0000 (00:53 +0200)
grml2usb

index 7df0f97..632134e 100755 (executable)
--- a/grml2usb
+++ b/grml2usb
@@ -1102,6 +1102,12 @@ def copy_bootloader_files(iso_mount, target):
         bootsplash = search_file(ffile, iso_mount)
         exec_rsync(bootsplash, syslinux_target + ffile)
 
         bootsplash = search_file(ffile, iso_mount)
         exec_rsync(bootsplash, syslinux_target + ffile)
 
+    if not search_file('default.cfg', iso_mount + '/boot/isolinux/'):
+        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.")
+        raise
+
     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':
     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':