diff options
author | Mike Fulbright <msf@redhat.com> | 2000-05-30 21:53:06 +0000 |
---|---|---|
committer | Mike Fulbright <msf@redhat.com> | 2000-05-30 21:53:06 +0000 |
commit | b22b24c50dc6227e9369c6a513b80208df01c758 (patch) | |
tree | d158d529a0f9d2dd0fed963992615018def735f7 /fstab.py | |
parent | e9f3a1c91686e0f7414dcf1102d18fc8220ac870 (diff) | |
download | anaconda-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.py | 22 |
1 files changed, 18 insertions, 4 deletions
@@ -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): |