Browse Source

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
Zbigniew Jędrzejewski-Szmek 6 years ago committed by Lukáš Nykrýn
parent
commit
b1c5cae63f
  1. 8
      50-dracut.install
  2. 2
      51-dracut-rescue.install

8
50-dracut.install

@ -36,7 +36,13 @@ case "$COMMAND" in
elif [[ -f /usr/lib/kernel/cmdline ]]; then elif [[ -f /usr/lib/kernel/cmdline ]]; then
read -r -d '' -a BOOT_OPTIONS < /usr/lib/kernel/cmdline read -r -d '' -a BOOT_OPTIONS < /usr/lib/kernel/cmdline
else 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 fi


unset noimageifnotneeded unset noimageifnotneeded

2
51-dracut-rescue.install

@ -48,6 +48,8 @@ if [[ -f /etc/kernel/cmdline ]]; then
elif [[ -f /usr/lib/kernel/cmdline ]]; then elif [[ -f /usr/lib/kernel/cmdline ]]; then
read -r -d '' -a BOOT_OPTIONS < /usr/lib/kernel/cmdline read -r -d '' -a BOOT_OPTIONS < /usr/lib/kernel/cmdline
else else
declare -a BOOT_OPTIONS

read -r -d '' -a line < /proc/cmdline read -r -d '' -a line < /proc/cmdline
for i in "${line[@]}"; do for i in "${line[@]}"; do
[[ "${i#initrd=*}" != "$i" ]] && continue [[ "${i#initrd=*}" != "$i" ]] && continue

Loading…
Cancel
Save