summaryrefslogtreecommitdiffstats
path: root/fstab.py
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>2000-07-21 22:27:33 +0000
committerErik Troan <ewt@redhat.com>2000-07-21 22:27:33 +0000
commit0dcee76ee21456740c04e0b1bb4f135d448c7651 (patch)
treeffa800fff7b1e8b0afa167f40dad31fe7f1c8dc4 /fstab.py
parent1a020b840ededc3b0cb8fbd03ba739a96fa02284 (diff)
downloadanaconda-0dcee76ee21456740c04e0b1bb4f135d448c7651.tar.gz
anaconda-0dcee76ee21456740c04e0b1bb4f135d448c7651.tar.xz
anaconda-0dcee76ee21456740c04e0b1bb4f135d448c7651.zip
added startExistingRaid() and stopExistingRaid(), normalizing how raid
happens
Diffstat (limited to 'fstab.py')
-rw-r--r--fstab.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/fstab.py b/fstab.py
index 284de0ca2..155e652ff 100644
--- a/fstab.py
+++ b/fstab.py
@@ -389,6 +389,14 @@ class Fstab:
def clearExistingRaid(self):
self.existingRaid = []
+ def startExistingRaid(self):
+ for (raidDevice, mntPoint, fileSystem, deviceList) in self.existingRaid:
+ isys.raidstart(raidDevice, deviceList[0])
+
+ def stopExistingRaid(self):
+ for (raidDevice, mntPoint, fileSystem, deviceList) in self.existingRaid:
+ isys.raidstop(raidDevice)
+
def addExistingRaidDevice(self, raidDevice, mntPoint, fsystem, deviceList):
self.existingRaid.append(raidDevice, mntPoint, fsystem, deviceList)
@@ -463,8 +471,7 @@ class Fstab:
isys.makeDevInode("loop1", '/tmp/' + "loop1")
isys.unlosetup("/tmp/loop1")
- for (raidDevice, mntPoint, fileSystem, deviceList) in self.existingRaid:
- isys.raidstop(raidDevice)
+ self.stopExistingRaid()
def readLabels(self, skipList = []):
labels = {}
@@ -516,8 +523,7 @@ class Fstab:
# XXX remove extraneous inodes here
# print "created raid"
- for (raidDevice, mntPoint, fileSystem, deviceList) in self.existingRaid:
- isys.raidstart(raidDevice, deviceList[0])
+ self.startExistingRaid()
if not self.setupFilesystems: return
@@ -625,6 +631,8 @@ class Fstab:
os.remove('/tmp/' + device)
+ self.stopExistingRaid()
+
def hasDirtyFilesystems(self):
if (not self.setupFilesystems): return
@@ -646,6 +654,8 @@ class Fstab:
def mountFilesystems(self, instPath):
if (not self.setupFilesystems): return
+ self.startExistingRaid()
+
for (mntpoint, device, fsystem, doFormat, size) in self.mountList():
if fsystem == "swap":
continue