quarks/sys-kernel/dracut/files/055-fix-base-do-not-quote-initargs-for-switch_root.patch

33 lines
1.1 KiB
Diff

From 285e2ad01035743ff51005a74e486e09fcbb0a0d Mon Sep 17 00:00:00 2001
From: Mike Gilbert <floppym@gentoo.org>
Date: Fri, 23 Jul 2021 14:35:07 -0400
Subject: [PATCH] fix(base): do not quote $initargs for switch_root
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 | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules.d/99base/init.sh b/modules.d/99base/init.sh
index 978adb6f..ab62bb44 100755
--- a/modules.d/99base/init.sh
+++ b/modules.d/99base/init.sh
@@ -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
--
2.32.0