]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(base): do not quote $CLINE in the `set` command
authorDmitry Klochkov <dmitry.klochkov@bell-sw.com>
Mon, 27 Mar 2023 10:25:57 +0000 (13:25 +0300)
committerLaszlo Gombos <laszlo.gombos@gmail.com>
Tue, 28 Mar 2023 11:33:37 +0000 (07:33 -0400)
This is needed to correctly parse init arguments.

Fixes: 2fabaaa62dcfd31e593ca45e1374e55adae29d6b
modules.d/99base/init.sh

index 27563d0a40b0e6267e19242dbfa9426f2abd0e25..344455596e631d8412f2d4e7f7739eb4baf77f32 100755 (executable)
@@ -328,7 +328,8 @@ if getarg init= > /dev/null; then
     ignoreargs="console BOOT_IMAGE"
     # only pass arguments after init= to the init
     CLINE=${CLINE#*init=}
-    set -- "$CLINE"
+    # shellcheck disable=SC2086
+    set -- $CLINE
     shift # clear out the rest of the "init=" arg
     for x in "$@"; do
         for s in $ignoreargs; do
@@ -339,7 +340,8 @@ if getarg init= > /dev/null; then
     unset CLINE
 else
     debug_off # Turn off debugging for this section
-    set -- "$CLINE"
+    # shellcheck disable=SC2086
+    set -- $CLINE
     for x in "$@"; do
         case "$x" in
             [0-9] | s | S | single | emergency | auto)