|
|
47313b1 |
From b464167132f65d25364d3d22368346ab48981a4a Mon Sep 17 00:00:00 2001
|
|
|
b397f2a |
From: Michael Chapman <mike@very.puzzling.org>
|
|
|
b397f2a |
Date: Wed, 29 Oct 2014 11:54:07 +1100
|
|
|
b397f2a |
Subject: [PATCH] kernel-install/90-loaderentry.install: fix cmdline parsing
|
|
|
b397f2a |
|
|
|
b397f2a |
A recent commit (2f3a215) changed the parsing of /proc/cmdline to use a
|
|
|
b397f2a |
shell array. Unfortunately, this introduced a bug: "read -ar line"
|
|
|
b397f2a |
populates the shell variable $r, not $line. This breaks installation of
|
|
|
b397f2a |
new loader entries:
|
|
|
b397f2a |
|
|
|
b397f2a |
# kernel-install add 3.17.1-304.fc21.x86_64 \
|
|
|
b397f2a |
/boot/vmlinuz-3.17.1-304.fc21.x86_64
|
|
|
b397f2a |
Could not determine the kernel command line parameters.
|
|
|
b397f2a |
Please specify the kernel command line in /etc/kernel/cmdline!
|
|
|
b397f2a |
|
|
|
b397f2a |
This commit alters the read command to correctly populate the $line
|
|
|
b397f2a |
array instead.
|
|
|
b397f2a |
|
|
|
b397f2a |
(cherry picked from commit c008f6ee8df9aa36782378d1a3767543b3635a54)
|
|
|
b397f2a |
---
|
|
|
b397f2a |
src/kernel-install/90-loaderentry.install | 2 +-
|
|
|
b397f2a |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
b397f2a |
|
|
|
b397f2a |
diff --git a/src/kernel-install/90-loaderentry.install b/src/kernel-install/90-loaderentry.install
|
|
|
b397f2a |
index 6f032b5a4b..d433e00a5c 100644
|
|
|
b397f2a |
--- a/src/kernel-install/90-loaderentry.install
|
|
|
b397f2a |
+++ b/src/kernel-install/90-loaderentry.install
|
|
|
b397f2a |
@@ -47,7 +47,7 @@ if [[ -f /etc/kernel/cmdline ]]; then
|
|
|
b397f2a |
fi
|
|
|
b397f2a |
|
|
|
b397f2a |
if ! [[ ${BOOT_OPTIONS[*]} ]]; then
|
|
|
b397f2a |
- read -ar line < /proc/cmdline
|
|
|
b397f2a |
+ read -a line -r < /proc/cmdline
|
|
|
b397f2a |
for i in "${line[@]}"; do
|
|
|
b397f2a |
[[ "${i#initrd=*}" != "$i" ]] && continue
|
|
|
b397f2a |
BOOT_OPTIONS[${#BOOT_OPTIONS[@]}]="$i"
|