kexec-boot: Streamline cmdline remove filtering

Use sed one-liner vs 3 bash inline commands

Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>
This commit is contained in:
Matt DeVillier 2021-10-15 13:38:24 -05:00
parent 7519f34d90
commit 1def8f95b4
No known key found for this signature in database
GPG Key ID: 2BBB776A35B978FD

View File

@ -49,9 +49,7 @@ 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=$(echo $cmdline | sed "s/\b$i\b//g")
done
fi