From 12457016940b08a4f4c7cc64758971e3e9505b70 Mon Sep 17 00:00:00 2001 From: chri2 Date: Wed, 29 Sep 2021 06:57:18 +0000 Subject: [PATCH] fix bug with e.g. nosplash parameter in kernel command line strings from $cmdremove should only be removed from $cmdline if they are enclosed by spaces of if they are at the beginning of $cmdline followed by a space or if they are at the end of $cmdline prepended by a space --- initrd/bin/kexec-boot | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/initrd/bin/kexec-boot b/initrd/bin/kexec-boot index fb9e9ede..83940bed 100755 --- a/initrd/bin/kexec-boot +++ b/initrd/bin/kexec-boot @@ -49,7 +49,9 @@ adjusted_cmd_line="n" adjust_cmd_line() { if [ -n "$cmdremove" ]; then for i in $cmdremove; do - cmdline="${cmdline//$i/}" + cmdline="${cmdline#$i }" + cmdline="${cmdline/ $i / }" + cmdline="${cmdline% $i}" done fi