Support setting bootoptions in syslinux.cfg
authorMichael Prokop <mika@grml.org>
Mon, 19 Oct 2009 00:42:12 +0000 (02:42 +0200)
committerUlrich Dangel <uli@spamt.net>
Mon, 19 Oct 2009 23:05:47 +0000 (01:05 +0200)
grml2usb

index 8ffe71f..66c40c3 100755 (executable)
--- a/grml2usb
+++ b/grml2usb
@@ -1371,11 +1371,18 @@ def adjust_syslinux_bootoptions(src_name, dst_name, flavour):
     src = open(src_name, "r")
     dst = open(dst_name, "w")
 
+    # do NOT write "None" in kernel cmdline
+    if options.bootoptions is None:
+        bootopt = ""
+    else:
+        bootopt = options.bootoptions
+
     for line in src:
         line = boot_re.sub(r'/boot/release/%s/\2 ' % flavour, line)
         line = flavour_re.sub(r'\1 %s-\2' % flavour, line)
         line = default_re.sub(r'%s-\1' % flavour, line)
         line = append_re.sub(r'\1 live-media-path=/live/%s/ ' % flavour, line)
+        line = append_re.sub(r'\1 boot=live %s ' % bootopt, line)
         dst.write(line)
     src.close()
     dst.close()