From: Harald Hoyer Date: Mon, 1 Jun 2015 09:28:03 +0000 (+0200) Subject: 90-loaderentry.install: fixup BOOT_OPTIONS X-Git-Tag: v221~224^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F37%2Fhead;p=thirdparty%2Fsystemd.git 90-loaderentry.install: fixup BOOT_OPTIONS better use "read -r -d '' -a" to read in the array. It handles multiple lines and missing newline at the EOF. --- diff --git a/src/kernel-install/90-loaderentry.install b/src/kernel-install/90-loaderentry.install index d433e00a5c3..4c9b1f0327a 100644 --- a/src/kernel-install/90-loaderentry.install +++ b/src/kernel-install/90-loaderentry.install @@ -43,14 +43,14 @@ fi declare -a BOOT_OPTIONS if [[ -f /etc/kernel/cmdline ]]; then - readarray -t BOOT_OPTIONS < /etc/kernel/cmdline + read -r -d '' -a BOOT_OPTIONS < /etc/kernel/cmdline fi if ! [[ ${BOOT_OPTIONS[*]} ]]; then - read -a line -r < /proc/cmdline + read -r -d '' -a line < /proc/cmdline for i in "${line[@]}"; do [[ "${i#initrd=*}" != "$i" ]] && continue - BOOT_OPTIONS[${#BOOT_OPTIONS[@]}]="$i" + BOOT_OPTIONS+=("$i") done fi