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

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



So it's in the archive, ack'ed this on IRC.  Patch went in to
anaconda-13.21.81-1.

On Wed, 25 Aug 2010, Ales Kozumplik wrote:

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'



--
David Cantrell <dcantrell redhat com>
Red Hat / Honolulu, HI


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