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