diff options
author | Mike Fulbright <msf@redhat.com> | 2000-05-02 16:51:01 +0000 |
---|---|---|
committer | Mike Fulbright <msf@redhat.com> | 2000-05-02 16:51:01 +0000 |
commit | bc5f78af534d074fabfcd4a294ae096b37d569e6 (patch) | |
tree | a08eaab295728498f5002b2c646c3e62f715876e /fstab.py | |
parent | 5aeb91d61091789e82480624e83e7231aa46205c (diff) | |
download | anaconda-bc5f78af534d074fabfcd4a294ae096b37d569e6.tar.gz anaconda-bc5f78af534d074fabfcd4a294ae096b37d569e6.tar.xz anaconda-bc5f78af534d074fabfcd4a294ae096b37d569e6.zip |
Fixes to make ks --onpart work better
Diffstat (limited to 'fstab.py')
-rw-r--r-- | fstab.py | 26 |
1 files changed, 22 insertions, 4 deletions
@@ -48,11 +48,15 @@ class Fstab: swapCount = 0 fstab = [] - for (mntpoint, dev, fstype, reformat, size, fsopts) in self.extraFilesystems: + for (mntpoint, dev, fstype, reformat, size) in self.extraFilesystems: fstab.append ((dev, mntpoint)) ddruid = self.createDruid(fstab = fstab, ignoreBadDrives = 1) + # skip out here if not partitions defined, just onpart def's + if partitions == None: + return ddruid + for (mntpoint, size, maxsize, grow, device, fsopts) in partitions: type = 0x83 if (mntpoint == "swap"): @@ -66,7 +70,8 @@ class Fstab: try: ddruid.attempt (attempt, "Junk Argument", clearParts) - return ddruid + + return ddruid except: pass @@ -634,8 +639,21 @@ class Fstab: if not skipExtra: for n in self.extraFilesystems: (mntpoint, sevice, fsType, doFormat, size) = n - if fsType == "swap": continue - fstab.append(n) + + # skip swap + if fsType == "swap": + continue + + # skip duplicate entries (happens when ks used with --onpart) + foundit = 0 + for p in fstab: + (mntpoint2, device2, fsType2, doFormat2, size2) = p + if mntpoint2 == mntpoint: + foundit = 1 + break + + if not foundit: + fstab.append(n) fstab.sort(sortMounts) |