30 lines
1.1 KiB
Diff
30 lines
1.1 KiB
Diff
From 982161e062e1696067cc19a990a31924b29c0df1 Mon Sep 17 00:00:00 2001
|
|
From: Will Woods <wwoods@redhat.com>
|
|
Date: Tue, 1 May 2012 14:08:33 -0400
|
|
Subject: [PATCH] fix _getcmdline arg-duplicating bug with /etc/cmdline*
|
|
|
|
If you unset CMDLINE to make _getcmdline re-read /etc/cmdline and
|
|
/etc/cmdline.d/*, CMDLINE_ETC and CMDLINE_ETC_D would keep their
|
|
contents.
|
|
|
|
This is a serious problem if you have (e.g.) "ip=eth0:dhcp" in
|
|
/etc/cmdline.d/net.conf, because getargs ip= will return
|
|
"ip=eth0:dhcp ip=eth0:dhcp" and then parse-ip-opts.sh will die() because
|
|
you have two configurations for eth0.
|
|
---
|
|
modules.d/99base/dracut-lib.sh | 1 +
|
|
1 Datei geändert, 1 Zeile hinzugefügt(+)
|
|
|
|
diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
|
|
index a6b8d1a..ddb6954 100755
|
|
--- a/modules.d/99base/dracut-lib.sh
|
|
+++ b/modules.d/99base/dracut-lib.sh
|
|
@@ -48,6 +48,7 @@ _getcmdline() {
|
|
local _i
|
|
unset _line
|
|
if [ -z "$CMDLINE" ]; then
|
|
+ unset CMDLINE_ETC CMDLINE_ETC_D
|
|
if [ -e /etc/cmdline ]; then
|
|
while read -r _line; do
|
|
CMDLINE_ETC="$CMDLINE_ETC $_line";
|