Added support for removing existing boot parameters to grml2iso.
authorUlrich Dangel <uli@spamt.net>
Sat, 24 Oct 2009 01:01:35 +0000 (03:01 +0200)
committerUlrich Dangel <uli@spamt.net>
Sat, 24 Oct 2009 12:19:44 +0000 (14:19 +0200)
Added -r option for specifying boot options to be removed.
Updated grml2iso documentation.

grml2iso
grml2iso.8.txt

index 36f939a..661ef86 100755 (executable)
--- a/grml2iso
+++ b/grml2iso
@@ -35,6 +35,8 @@ Options:
      -b Boot Params    Additional boot parameters passed to grml2usb
      -c Directory      Copy files from directory to generated iso
      -f                Force overwrite of existing target.iso
+     -r BootParam      Remove specified boot params.
+                       Could be specfied multiple times.
 "
     [ -n "$1" ] && exit $1 || exit 1
   }
@@ -45,14 +47,16 @@ Options:
 
   ISOFILE=''
   DIR=''
-  GRML2USB_PARAMS=''
+  ADD_OPTS=''
   FORCE=''
-  while getopts fb:c:o: name; do
+  typeset -a REMOVE_OPTS
+  while getopts fb:c:o:r: name; do
     case $name in
       o)   ISOFILE="$OPTARG";;
-      b)   GRML2USB_PARAMS='--bootoptions='"${OPTARG}";;
+      b)   ADD_OPTS="--bootoption="$OPTARG"";;
       c)   DIR="$OPTARG";;
       f)   FORCE='true';;
+      r)   REMOVE_OPTS+=(--remove-bootoption="$OPTARG");;
       ?)   usage 2;;
     esac
   done
@@ -100,7 +104,7 @@ Options:
 # }}}}
 
 # execute grml2usb with all ISOs you'd like to install {{{
-  $GRML2USB "${GRML2USB_PARAMS}" "$@" "$WRKDIR/cddir"
+  $GRML2USB "${REMOVE_OPTS[@]}" ${ADD_OPTS:+"$ADD_OPTS"} "$@" "$WRKDIR/cddir"
 # }}}
 
 # move syslinux to isolinux {{{
index b2414ce..24fbc2d 100644 (file)
@@ -49,6 +49,11 @@ Use specified default bootoptions as default.
 
 Force the program to run and overwrite an existing iso image.
 
+  *\-r <boot param>*::
+
+Remove specified boot parameter from existing command line. Could be specified multiple times.
+
+
 
 
 Usage examples
@@ -62,6 +67,10 @@ Create multiboot ISO /tmp/grml.iso with grml_2009.05.iso and grml64_2009.05.iso.
 
 Create a new iso with additional boot parameters and copy the content from /tmp/grml-content to the generated iso image.
 
+  # grml2iso -r quiet -r vga=791 -o /srv/grml.iso /srv/grml-small_2009.10.iso
+
+Create a new iso and remove existing boot parameters quiet and vga=791.
+
   # GRML2USB=/srv/git/grml2usb grml2iso -o /srv/grml.iso /srv/grml/grml_2009.05.iso /srv/grml/grml64-medium_2009.05.iso
 
 Create multiboot ISO /srv/grml.iso with grml_2009.05.iso and