mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-18 20:47:55 +00:00
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:
parent
7519f34d90
commit
1def8f95b4
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user