summaryrefslogtreecommitdiffstats
path: root/partedUtils.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2002-06-10 22:59:16 +0000
committerJeremy Katz <katzj@redhat.com>2002-06-10 22:59:16 +0000
commitb43a33a2ccc5c6010250953c46590f5d88155703 (patch)
tree3999b2722362b06d8106272a175c80a63dae9946 /partedUtils.py
parentf8c797caff534fd49bf9e7a77f5f52c0332381ff (diff)
downloadanaconda-b43a33a2ccc5c6010250953c46590f5d88155703.tar.gz
anaconda-b43a33a2ccc5c6010250953c46590f5d88155703.tar.xz
anaconda-b43a33a2ccc5c6010250953c46590f5d88155703.zip
only try to unmount if we find a fs type
Diffstat (limited to 'partedUtils.py')
-rw-r--r--partedUtils.py18
1 files changed, 12 insertions, 6 deletions
diff --git a/partedUtils.py b/partedUtils.py
index cfb060395..cd9012926 100644
--- a/partedUtils.py
+++ b/partedUtils.py
@@ -381,16 +381,19 @@ class DiskSet:
for dev, devices, level, numActive in self.mdList:
(errno, msg) = (None, None)
+ found = 0
for fs in fsset.getFStoTry(dev):
try:
isys.mount(dev, mountpoint, fs, readOnly = 1)
+ found = 1
break
except SystemError, (errno, msg):
pass
- if os.access (mountpoint + '/etc/fstab', os.R_OK):
- rootparts.append ((dev, fs))
- isys.umount(mountpoint)
+ if found:
+ if os.access (mountpoint + '/etc/fstab', os.R_OK):
+ rootparts.append ((dev, fs))
+ isys.umount(mountpoint)
self.stopAllRaid()
@@ -408,16 +411,19 @@ class DiskSet:
lvs = os.listdir("/proc/lvm/VGs/%s/LVs" % (vg,))
for lv in lvs:
dev = "/dev/%s/%s" %(vg, lv)
+ found = 0
for fs in fsset.getFStoTry(dev):
try:
isys.mount(dev, mountpoint, fs, readOnly = 1)
+ found = 1
break
except SystemError:
pass
- if os.access (mountpoint + '/etc/fstab', os.R_OK):
- rootparts.append ((dev, fs))
- isys.umount(mountpoint)
+ if found:
+ if os.access (mountpoint + '/etc/fstab', os.R_OK):
+ rootparts.append ((dev, fs))
+ isys.umount(mountpoint)
lvm.vgdeactivate()