diff options
author | Mike Fulbright <msf@redhat.com> | 2000-05-03 19:52:54 +0000 |
---|---|---|
committer | Mike Fulbright <msf@redhat.com> | 2000-05-03 19:52:54 +0000 |
commit | caf4b4ca3cfd18ab5716dd707974f8226262a33d (patch) | |
tree | 6ee11941b2cbc854f3629aad802a07bb5b841653 | |
parent | e2dff0b66a53f29bb5a11ecc349129ac72d32972 (diff) | |
download | anaconda-caf4b4ca3cfd18ab5716dd707974f8226262a33d.tar.gz anaconda-caf4b4ca3cfd18ab5716dd707974f8226262a33d.tar.xz anaconda-caf4b4ca3cfd18ab5716dd707974f8226262a33d.zip |
made partition options tuple more managable
-rw-r--r-- | fstab.py | 7 | ||||
-rw-r--r-- | installclass.py | 15 | ||||
-rw-r--r-- | kickstart.py | 2 |
3 files changed, 15 insertions, 9 deletions
@@ -62,7 +62,10 @@ class Fstab: if partitions == None: return ddruid - for (mntpoint, size, maxsize, grow, device, fsopts) in partitions: + for (mntpoint, sizespec, locspec, typespec, fsopts) in partitions: + device = locspec + (size, maxsize, grow) = sizespec + type = 0x83 if (mntpoint == "swap"): mntpoint = "Swap%04d-auto" % swapCount @@ -83,7 +86,7 @@ class Fstab: if success == 1: # configure kickstart requested ext2 filesystem options - for (mntpoint, size, maxsize, grow, device, fsopts) in partitions: + for (mntpoint, sizespce, locspec, typespec, fsopts) in partitions: if fsopts != None: self.setfsOptions (mntpoint, fsopts) diff --git a/installclass.py b/installclass.py index dd7e5b3ad..a2bc92c6a 100644 --- a/installclass.py +++ b/installclass.py @@ -50,8 +50,7 @@ class BaseInstallClass: [ 0, 1, 5 ].index(level) for device in devices: found = 0 - for (otherMountPoint, size, maxSize, grow, forceDevice) in \ - self.partitions: + for (otherMountPoint, sizespc, locspc, fsopts) in self.partitions: if otherMountPoint == device: found = 1 if not found: @@ -67,14 +66,18 @@ class BaseInstallClass: self.raidList.append(mntPoint, raidDev, level, devices) - def addNewPartition(self, mntPoint, size, maxSize, grow, device, fsopts=None): - if not device: device = "" - + def addNewPartition(self, mntPoint, sizespec, locspec, typespec, fsopts=None): + device = locspec + + if not device: + device = "" + if mntPoint[0] != '/' and mntPoint != 'swap' and \ mntPoint[0:5] != "raid.": raise TypeError, "bad mount point for partitioning: %s" % \ (mntPoint,) - self.partitions.append((mntPoint, size, maxSize, grow, device, fsopts)) + + self.partitions.append((mntPoint, sizespec, (device),typespec, fsopts)) def addToFstab(self, mntpoint, dev, fstype = "ext2" , reformat = 1): self.fstab.append((mntpoint, (dev, fstype, reformat))) diff --git a/kickstart.py b/kickstart.py index c93c7ac44..322280e0c 100644 --- a/kickstart.py +++ b/kickstart.py @@ -455,7 +455,7 @@ class Kickstart(BaseInstallClass): else: self.addToFstab(extra[0], onPart) else: - self.addNewPartition(extra[0], size, maxSize, grow, device, fsopts) + self.addNewPartition(extra[0], (size, maxSize, grow), (device), (0,0), fsopts) def __init__(self, file, serial): BaseInstallClass.__init__(self) |