Use ";" as separator character when adjusting DEFAULT_BOOTOPTIONS via sed
authorMichael Prokop <mika@grml.org>
Mon, 27 Feb 2012 09:53:02 +0000 (10:53 +0100)
committerMichael Prokop <mika@grml.org>
Mon, 27 Feb 2012 09:53:04 +0000 (10:53 +0100)
Otherwise customizations like tz=Europe/Vienna will break, as
the "/" inside it will be interpreted by sed(1).

grml-live

index efd7f7c..3a2301f 100755 (executable)
--- a/grml-live
+++ b/grml-live
@@ -956,7 +956,7 @@ if [ "$ARCH" = i386 ] || [ "$ARCH" = amd64 ] ; then
            sed -i "s/%SHORT_NAME%/$SHORT_NAME/g"        "${file}"
            sed -i "s/%VERSION%/$VERSION/g"              "${file}"
 
-           [ -n "$DEFAULT_BOOTOPTIONS" ] && sed -i "s/ boot=live/ boot=live $DEFAULT_BOOTOPTIONS/"  "${file}"
+           [ -n "$DEFAULT_BOOTOPTIONS" ] && sed -i "s; boot=live; boot=live $DEFAULT_BOOTOPTIONS;"  "${file}"
 
            if [ -n "$NO_BOOTID" ] ; then
               sed -i "s/ bootid=%BOOTID%//g" "${file}" # drop bootid bootoption