50-dracut: synchronize option reading code with 51-dracut.install
initrd= option should also be dropped here. There is not reason for the code to be different in the two places.master
parent
38b4f4b21c
commit
b1c5cae63f
|
@ -36,7 +36,13 @@ case "$COMMAND" in
|
|||
elif [[ -f /usr/lib/kernel/cmdline ]]; then
|
||||
read -r -d '' -a BOOT_OPTIONS < /usr/lib/kernel/cmdline
|
||||
else
|
||||
read -r -d '' -a BOOT_OPTIONS < /proc/cmdline
|
||||
declare -a BOOT_OPTIONS
|
||||
|
||||
read -r -d '' -a line < /proc/cmdline
|
||||
for i in "${line[@]}"; do
|
||||
[[ "${i#initrd=*}" != "$i" ]] && continue
|
||||
BOOT_OPTIONS+=("$i")
|
||||
done
|
||||
fi
|
||||
|
||||
unset noimageifnotneeded
|
||||
|
|
|
@ -48,6 +48,8 @@ if [[ -f /etc/kernel/cmdline ]]; then
|
|||
elif [[ -f /usr/lib/kernel/cmdline ]]; then
|
||||
read -r -d '' -a BOOT_OPTIONS < /usr/lib/kernel/cmdline
|
||||
else
|
||||
declare -a BOOT_OPTIONS
|
||||
|
||||
read -r -d '' -a line < /proc/cmdline
|
||||
for i in "${line[@]}"; do
|
||||
[[ "${i#initrd=*}" != "$i" ]] && continue
|
||||
|
|
Loading…
Reference in New Issue