Allow multiple --bootoptions for grml2usb. This makes scripting a lot easier.
authorUlrich Dangel <mru@grml.org>
Sat, 12 Feb 2011 12:40:21 +0000 (13:40 +0100)
committerUlrich Dangel <mru@grml.org>
Sat, 12 Feb 2011 14:25:08 +0000 (15:25 +0100)
grml2usb
grml2usb.8.txt

index 9191e85..ac913c0 100755 (executable)
--- a/grml2usb
+++ b/grml2usb
@@ -60,7 +60,7 @@ Run %prog --help for usage hints, further information via: man grml2usb"
 # pylint: disable-msg=W0603
 parser = OptionParser(usage=USAGE)
 parser.add_option("--bootoptions", dest="bootoptions",
 # pylint: disable-msg=W0603
 parser = OptionParser(usage=USAGE)
 parser.add_option("--bootoptions", dest="bootoptions",
-                  action="store", type="string",
+                  action="append", type="string",
                   help="use specified bootoptions as default")
 parser.add_option("--bootloader-only", dest="bootloaderonly", action="store_true",
                   help="do not copy files but just install a bootloader")
                   help="use specified bootoptions as default")
 parser.add_option("--bootloader-only", dest="bootloaderonly", action="store_true",
                   help="do not copy files but just install a bootloader")
@@ -1593,10 +1593,10 @@ def get_bootoptions(grml_flavour):
     @grml_flavour: name of the grml_flavour
     """
     # do NOT write "None" in kernel cmdline
     @grml_flavour: name of the grml_flavour
     """
     # do NOT write "None" in kernel cmdline
-    if options.bootoptions is None:
+    if not options.bootoptions:
         bootopt = ""
     else:
         bootopt = ""
     else:
-        bootopt = options.bootoptions
+        bootopt = " ".join(options.bootoptions)
     bootopt = bootopt.replace("%flavour", grml_flavour)
     return bootopt
 
     bootopt = bootopt.replace("%flavour", grml_flavour)
     return bootopt
 
index 59c5627..91fd1b2 100644 (file)
@@ -52,7 +52,8 @@ The following options are supported:
   *\--bootoptions=...*::
 
 Use specified bootoptions as default. To use flavour name as a argument for a
   *\--bootoptions=...*::
 
 Use specified bootoptions as default. To use flavour name as a argument for a
-boot parameter use %flavour which will be expanded to the flavour name.
+boot parameter use %flavour which will be expanded to the flavour name. To add
+multiple bootoptions you can specify the option multiple time.
 
   *\--bootloader-only*::
 
 
   *\--bootloader-only*::
 
@@ -646,6 +647,7 @@ file instead of the one provided by the ISO.
 ///////////////////////////////////////////////////////////////////////////////////////
 
   # grml2usb --bootoptions="lang=de ssh=mysecret" grml_2009.10.iso /dev/sdX1
 ///////////////////////////////////////////////////////////////////////////////////////
 
   # grml2usb --bootoptions="lang=de ssh=mysecret" grml_2009.10.iso /dev/sdX1
+  # grml2usb --bootoptions="lang=de" --bootoptions="ssh=mysecret" grml_2009.10.iso /dev/sdX1
 
 Install specified ISO on device /dev/sdX1 and use "lang=de ssh=mysecret" as
 default bootoptions.
 
 Install specified ISO on device /dev/sdX1 and use "lang=de ssh=mysecret" as
 default bootoptions.