- skip BOOT_IMAGE param when copying the cmdline to BLS snippets

The bootloaders add a BOOT_IMAGE parameter that is present in the kernel
command line exposed via the /proc/cmdline virtual file. If this param
is added to the kernel cmdline in the BLS snippet, it will be duplicated.

Resolves: #1782321
This commit is contained in:
Javier Martinez Canillas 2019-12-12 12:07:01 +01:00 committed by Dan Horák
parent 594bda140c
commit 3e57fc3074

View File

@ -83,7 +83,7 @@ case "$COMMAND" in
if ! [[ ${BOOT_OPTIONS[*]} ]]; then
read -r -d '' -a line < /proc/cmdline
for i in "${line[@]}"; do
[[ "${i#initrd=*}" != "$i" ]] && continue
[[ "${i#initrd=*}" != "$i" || "${i#BOOT_IMAGE=*}" != "$i" ]] && continue
BOOT_OPTIONS+=("$i")
done
fi