diff options
author | Chris Lumens <clumens@redhat.com> | 2007-10-19 17:06:22 +0000 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2007-10-19 17:06:22 +0000 |
commit | 17f23ff101e1ceb738218dc46896bff614fe7fc2 (patch) | |
tree | 7e46c4cc28eedc1da664c32f8003c293949c1cdc | |
parent | 215ea4df3d47204acb8d871cc7829ab2700bf084 (diff) | |
download | anaconda-17f23ff101e1ceb738218dc46896bff614fe7fc2.tar.gz anaconda-17f23ff101e1ceb738218dc46896bff614fe7fc2.tar.xz anaconda-17f23ff101e1ceb738218dc46896bff614fe7fc2.zip |
Work around a quoting bug in pxelinux (#248170).
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | flags.py | 9 |
2 files changed, 11 insertions, 1 deletions
@@ -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, @@ -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: |