summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--flags.py9
2 files changed, 11 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index c1c2746eb..6a075b640 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -29,6 +29,9 @@
* network.py (Network.available): Filter available network devices by
checking their type in sysfs (#338461).
+ * flags.py (Flags.createCmdlineDict): Work around a quoting bug in
+ pxelinux (#248170).
+
2007-10-18 Peter Jones <pjones@redhat.com>
* isys/isys.c: add matchPathContext and setFileContext calls,
diff --git a/flags.py b/flags.py
index 2b2e7cfa5..9582faa43 100644
--- a/flags.py
+++ b/flags.py
@@ -32,7 +32,14 @@ class Flags:
def createCmdlineDict(self):
cmdlineDict = {}
- cmdline = open("/proc/cmdline", "r").read()
+ cmdline = open("/proc/cmdline", "r").read().strip()
+
+ # if the BOOT_IMAGE contains a space, pxelinux will strip one of the
+ # quotes leaving one at the end that shlex doesn't know what to do
+ # with
+ if cmdline.find("BOOT_IMAGE=") and cmdline.endswith('"'):
+ cmdline = cmdline.replace("BOOT_IMAGE=", "BOOT_IMAGE=\"")
+
lst = shlex.split(cmdline)
for i in lst: