[PATCH] Convert escaped spaces on cmdline to _ (#874381)
Brian C. Lane
bcl at redhat.com
Tue Jun 18 23:36:07 UTC 2013
From: "Brian C. Lane" <bcl at redhat.com>
We use shlex.split to parse the cmdline. This mostly works, except that
it removes any \\ from the string instead of converting them back to \
This results in the device LABEL having x20 in it, which isn't matching
the ID_FS_LABEL when looking for protected devices.
So, this replaces the \\x20 with _ when parsing the cmdline, which also
matches what ID_FS_LABEL expects. This results in the usb device being
filtered from the available disks for the install.
---
pyanaconda/flags.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/pyanaconda/flags.py b/pyanaconda/flags.py
index 7a22c90..125db3a 100644
--- a/pyanaconda/flags.py
+++ b/pyanaconda/flags.py
@@ -143,6 +143,10 @@ class BootArgs(OrderedDict):
if right.count('"') % 2:
cmdline = left + middle + '"' + right
+ # shlex doesn't properly handle \\ (it removes them)
+ # which scrambles the spaces used in labels so use underscores
+ cmdline = cmdline.replace("\\x20", "_")
+
lst = shlex.split(cmdline)
for i in lst:
--
1.8.1.4
More information about the anaconda-patches
mailing list