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
This commit is contained in:
chri2 2021-09-29 06:57:18 +00:00 committed by GitHub
parent 7a6a3fe5a4
commit 1245701694
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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