From: Dmitry Klochkov Date: Mon, 27 Mar 2023 10:25:57 +0000 (+0300) Subject: fix(base): do not quote $CLINE in the `set` command X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=8b951d20d409b3647c85a9c6d064ccb15cdb5fe7;p=thirdparty%2Fdracut.git fix(base): do not quote $CLINE in the `set` command This is needed to correctly parse init arguments. Fixes: 2fabaaa62dcfd31e593ca45e1374e55adae29d6b --- diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh index 27563d0a4..344455596 100755 --- a/modules.d/99base/init.sh +++ b/modules.d/99base/init.sh @@ -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)