]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(base): do not quote $initargs for switch_root
authorMike Gilbert <floppym@gentoo.org>
Fri, 23 Jul 2021 18:35:07 +0000 (14:35 -0400)
committerJóhann B. Guðmundsson <johannbg@gmail.com>
Fri, 6 Aug 2021 13:52:19 +0000 (13:52 +0000)
We want word splitting to occur so that the arguments are passed
separately, and we don't end up passing an empty string if no arguments
are specified.

Bug: https://bugs.gentoo.org/803548
Fixes: 2fabaaa62dcfd31e593ca45e1374e55adae29d6b
modules.d/99base/init.sh

index 978adb6ff45a0265552e7292c633b61516b70976..ab62bb44857cb114fe0cbde262ab4a0864d20b26 100755 (executable)
@@ -387,7 +387,8 @@ if [ -f /etc/capsdrop ]; then
         }
 else
     unset RD_DEBUG
-    exec "$SWITCH_ROOT" "$NEWROOT" "$INIT" "$initargs" || {
+    # shellcheck disable=SC2086
+    exec "$SWITCH_ROOT" "$NEWROOT" "$INIT" $initargs || {
         warn "Something went very badly wrong in the initramfs.  Please "
         warn "file a bug against dracut."
         emergency_shell