[rhel6-branch] mpath: put quotes around the wwids, they can have spaces.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Related: rhbz#626842
---
 storage/devicelibs/mpath.py |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/storage/devicelibs/mpath.py b/storage/devicelibs/mpath.py
index 181c964..944b5d6 100644
--- a/storage/devicelibs/mpath.py
+++ b/storage/devicelibs/mpath.py
@@ -226,7 +226,7 @@ blacklist {
 """
         for device in self.blacklist_devices:
             if device.serial:
-                ret += '\twwid %s\n' % device.serial
+                ret += '\twwid "%s"\n' % device.serial
             elif device.vendor and device.model:
                 ret += '\tdevice {\n'
                 ret += '\t\tvendor %s\n' % device.vendor
@@ -239,13 +239,16 @@ blacklist {
                 for mpath in self.mpaths:
                     for k,v in mpath.config.items():
                         if k == 'wwid':
-                            ret += '\twwid %s\n' % v
+                            ret += '\twwid "%s"\n' % v
         ret += '}\n'
         ret += 'multipaths {\n'
         for mpath in self.mpaths:
             ret += '\tmultipath {\n'
             for k,v in mpath.config.items():
-                ret += '\t\t%s %s\n' % (k, v)
+                if k == 'wwid':
+                    ret += '\t\twwid "%s"\n' % v
+                else:
+                    ret += '\t\t%s %s\n' % (k, v)
             ret += '\t}\n'
         ret += '}\n'
 
-- 
1.7.1.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux