summaryrefslogtreecommitdiffstats
path: root/fstab.py
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2000-05-02 16:51:01 +0000
committerMike Fulbright <msf@redhat.com>2000-05-02 16:51:01 +0000
commitbc5f78af534d074fabfcd4a294ae096b37d569e6 (patch)
treea08eaab295728498f5002b2c646c3e62f715876e /fstab.py
parent5aeb91d61091789e82480624e83e7231aa46205c (diff)
downloadanaconda-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.py26
1 files changed, 22 insertions, 4 deletions
diff --git a/fstab.py b/fstab.py
index 3400ae4d7..479434a55 100644
--- a/fstab.py
+++ b/fstab.py
@@ -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)