diff options
Diffstat (limited to 'pyanaconda/storage/devicelibs/mpath.py')
-rw-r--r-- | pyanaconda/storage/devicelibs/mpath.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pyanaconda/storage/devicelibs/mpath.py b/pyanaconda/storage/devicelibs/mpath.py index 6b088963f..2e5efd16b 100644 --- a/pyanaconda/storage/devicelibs/mpath.py +++ b/pyanaconda/storage/devicelibs/mpath.py @@ -3,6 +3,7 @@ import re from ..udev import udev_device_is_disk from pyanaconda import iutil +from pyanaconda.flags import flags from pyanaconda.anaconda_log import log_method_call import logging @@ -266,6 +267,17 @@ blacklist { return ret + def writeConfig(self, friendly_names=True): + if not flags.mpath: + # not writing out a multipath.conf will effectively blacklist all + # mpath which will prevent any of them from being activated during + # install + return + + cfg = self.write(friendly_names) + with open("/etc/multipath.conf", "w+") as mpath_cfg: + mpath_cfg.write(cfg) + def flush_mpaths(): iutil.execWithRedirect("multipath", ["-F"]) check_output = iutil.execWithCapture("multipath", ["-ll"]).strip() |