mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-28 09:00:41 +00:00
kernel-install/90-loaderentry.install: fixed cmdline parsing
If /etc/kernel/cmdline is missing or empty, we read /proc/cmdline and want to filter out the initrd line. Due to a bug, the whole contents was filtered out.
This commit is contained in:
@@ -47,11 +47,10 @@ if [[ -f /etc/kernel/cmdline ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if ! [[ ${BOOT_OPTIONS[*]} ]]; then
|
if ! [[ ${BOOT_OPTIONS[*]} ]]; then
|
||||||
readarray -t line < /proc/cmdline
|
read -ar line < /proc/cmdline
|
||||||
for i in ${line[*]}; do
|
for i in "${line[@]}"; do
|
||||||
if [[ "${i#initrd=*}" == "$i" ]]; then
|
[[ "${i#initrd=*}" != "$i" ]] && continue
|
||||||
BOOT_OPTIONS[${#BOOT_OPTIONS[@]}]="$i"
|
BOOT_OPTIONS[${#BOOT_OPTIONS[@]}]="$i"
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user