diff options
author | Harald Hoyer <harald@redhat.com> | 2015-06-01 11:28:03 +0200 |
---|---|---|
committer | Harald Hoyer <harald@redhat.com> | 2015-06-02 16:10:06 +0200 |
commit | 6fd2ccc957f21a423e1457c66e53b1697944d72a (patch) | |
tree | d490548e2b3ea86769b83ae5371a7cf938d4236d /src/kernel-install/90-loaderentry.install | |
parent | 6f54f5373aa681e66278e8e6edaea06e3d0f8958 (diff) |
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.
Diffstat (limited to 'src/kernel-install/90-loaderentry.install')
-rw-r--r-- | src/kernel-install/90-loaderentry.install | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/kernel-install/90-loaderentry.install b/src/kernel-install/90-loaderentry.install index d433e00a5c..4c9b1f0327 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 |