summaryrefslogtreecommitdiffstats
path: root/fstab.py
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2000-05-30 21:53:06 +0000
committerMike Fulbright <msf@redhat.com>2000-05-30 21:53:06 +0000
commitb22b24c50dc6227e9369c6a513b80208df01c758 (patch)
treed158d529a0f9d2dd0fed963992615018def735f7 /fstab.py
parente9f3a1c91686e0f7414dcf1102d18fc8220ac870 (diff)
downloadanaconda-b22b24c50dc6227e9369c6a513b80208df01c758.tar.gz
anaconda-b22b24c50dc6227e9369c6a513b80208df01c758.tar.xz
anaconda-b22b24c50dc6227e9369c6a513b80208df01c758.zip
fix problem (second try) at making '/' on vfat choke in ks mode. Should also let you mount non-ext2 on non-'/' mount points using part --dontformat --onpart <part>
Diffstat (limited to 'fstab.py')
-rw-r--r--fstab.py22
1 files changed, 18 insertions, 4 deletions
diff --git a/fstab.py b/fstab.py
index c351a235a..22786c061 100644
--- a/fstab.py
+++ b/fstab.py
@@ -68,9 +68,10 @@ class Fstab:
ddruid = self.createDruid(fstab = fstab, ignoreBadDrives = 1)
# skip out here if not partitions defined, just onpart def's
- if partitions == None:
- return ddruid
-
+ # cant do this now, have to let attempt fixup partition types
+ #if partitions == None:
+ # return ddruid
+
for (mntpoint, sizespec, locspec, typespec, fsopts) in partitions:
(device, part, primOnly) = locspec
(size, maxsize, grow) = sizespec
@@ -105,6 +106,17 @@ class Fstab:
if fsopts != None:
self.setfsOptions (mntpoint, fsopts)
+ # sanity check
+ for (partition, mount, fsystem, size) in ddruid.getFstab():
+ if mount == '/' and fsystem != 'ext2':
+ raise ValueError, "--onpart specified for mount point / on non-ext2 partition"
+
+ # if mount point other than '/' is on non-ext2, better have
+ # specified --dontformat
+ for (mntpoint, (dev, fstype, reformat)) in prefstab:
+ if mntpoint == mount and reformat != 0 and fsystem != fstype:
+ raise ValueError, "--onpart specified for mount point %s on non-ext2 partition without --dontformat option" % mntpoint
+
return ddruid
else:
return None
@@ -696,7 +708,9 @@ class Fstab:
fstab = []
for (partition, mount, fsystem, size) in self.ddruid.getFstab():
- if fsystem == "swap": continue
+
+ if fsystem == "swap":
+ continue
if not self.fsCache.has_key((partition, mount)):
if mount == '/home' and isValidExt2(partition):