summaryrefslogtreecommitdiffstats
path: root/kickstart.py
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2006-07-17 22:28:52 +0000
committerPeter Jones <pjones@redhat.com>2006-07-17 22:28:52 +0000
commit066636bcfe2417f4babeb85b9cf9aeb3f61f0a59 (patch)
tree2f45a695c774b639a7d4724fbac810483d16776f /kickstart.py
parent1b1179e86989d6e6c300aaff80fcd9c0745e6b21 (diff)
downloadanaconda-066636bcfe2417f4babeb85b9cf9aeb3f61f0a59.tar.gz
anaconda-066636bcfe2417f4babeb85b9cf9aeb3f61f0a59.tar.xz
anaconda-066636bcfe2417f4babeb85b9cf9aeb3f61f0a59.zip
- add multipath support in kickstart.py
Diffstat (limited to 'kickstart.py')
-rw-r--r--kickstart.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/kickstart.py b/kickstart.py
index ebad8424a..ad5e1f6bb 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -316,6 +316,32 @@ class AnacondaKSHandlers(KickstartHandlers):
self.skipSteps.append("network")
+ def doMultiPath(self, id, args):
+ KickstartHandlers.doMPath(self, args)
+
+ from partedUtils import DiskSet
+ ds = DiskSet()
+ ds.startMPath()
+
+ mpath = self.ksdata.mpaths[-1]
+ log.debug("Searching for mpath '%s'" % (mpath.name,))
+ for mp in DiskSet.mpList or []:
+ it = True
+ for dev in mpath.devices:
+ dev = dev.split('/')[-1]
+ log.debug("mpath '%s' has members %s" % (mp.name, list(mp.members)))
+ if not dev in mp.members:
+ log.debug("mpath '%s' does not have device %s, skipping" \
+ % (mp.name, dev))
+ it = False
+ if it:
+ log.debug("found mpath '%s', changing name to %s" \
+ % (mp.name, mpath.name))
+ newname = mpath.name
+ ds.renameMPath(mp, newname)
+ return
+ ds.startMPath()
+
def doDmRaid(self, id, args):
KickstartHandlers.doDmRaid(self, args)
@@ -801,6 +827,7 @@ class Kickstart(BaseInstallClass):
# make sure our disks are alive
from partedUtils import DiskSet
ds = DiskSet()
+ ds.startMPath()
ds.startDmRaid()
# parse the %pre