]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
change the way init arguments are stripped from the command line
authorHarald Hoyer <harald@redhat.com>
Wed, 15 Jul 2009 07:06:13 +0000 (09:06 +0200)
committerHarald Hoyer <harald@redhat.com>
Wed, 15 Jul 2009 16:27:20 +0000 (18:27 +0200)
$initrdargs now holds all command line options we want to strip from the
command line. Command line parsers can extend this space separated list.

modules.d/99base/init

index 4c90f2bae8016c3abebb9f1dd103ebd707b74f3f..ae71763faaad15f08a5184023cd68e08bd2a247b 100755 (executable)
@@ -203,16 +203,12 @@ for i in $(export -p); do
 done
 
 initargs=""
+initrdargs="$initrdargs console BOOT_IMAGE rdbreak rdinitdebug rdudevinfo rdudevdebug rdnetdebug rdcopystate rdshell"
+
 for x in "$@"; do
-    [ "${x%%=*}" = "console" ] && continue
-    [ "${x%%=*}" = "BOOT_IMAGE" ] && continue
-    [ "${x%%=*}" = "rdbreak" ] && continue
-    [ "${x%%=*}" = "rdinitdebug" ] && continue
-    [ "${x%%=*}" = "rdudevinfo" ] && continue
-    [ "${x%%=*}" = "rdudevdebug" ] && continue
-    [ "${x%%=*}" = "rdnetdebug" ] && continue
-    [ "${x%%=*}" = "rdcopystate" ] && continue
-    [ "${x%%=*}" = "rdshell" ] && continue
+    for s in $initrdargs; do       
+       [ "${x%%=*}" = $s ] && continue 1
+    done
     initargs="$initargs $x"
 done