summaryrefslogtreecommitdiffstats
path: root/kickstart.py
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>1999-09-01 00:24:43 +0000
committerErik Troan <ewt@redhat.com>1999-09-01 00:24:43 +0000
commit3f92666dcb0171105dfc38eff8b31fec2c983e92 (patch)
treed4bb64bb41c7eeb3fa74c7e473fd22a93c4c788e /kickstart.py
parentddb1c1454012411f2636c59d651be3bd98151692 (diff)
downloadanaconda-3f92666dcb0171105dfc38eff8b31fec2c983e92.tar.gz
anaconda-3f92666dcb0171105dfc38eff8b31fec2c983e92.tar.xz
anaconda-3f92666dcb0171105dfc38eff8b31fec2c983e92.zip
changes to make partitioning work in kickstart
Diffstat (limited to 'kickstart.py')
-rw-r--r--kickstart.py28
1 files changed, 27 insertions, 1 deletions
diff --git a/kickstart.py b/kickstart.py
index bd3ca1842..7e5ea5907 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -126,6 +126,7 @@ class Kickstart(InstallClass):
"lilo" : self.doLilo ,
"network" : None ,
"nfs" : None ,
+ "partition" : self.definePartition ,
"rootpw" : self.doRootPw ,
"timezone" : self.doTimezone ,
"upgrade" : self.doUpgrade ,
@@ -140,11 +141,36 @@ class Kickstart(InstallClass):
cmd = args[0]
if handlers[cmd]: handlers[cmd](args[1:])
-
+
+ def definePartition(self, args):
+ # we just set up the desired partitions -- magic in our base class
+ # does the actual partitioning (no, you don't want to know the
+ # details)
+ size = 0
+ grow = 0
+ maxSize = 0
+
+ (args, extra) = getopt.getopt(args, '', [ 'size=', 'maxsize=',
+ 'grow' ])
+
+ for n in args:
+ (str, arg) = n
+ if str == '--size':
+ size = int(arg)
+ elif str == '--maxsize':
+ maxSize = int(arg)
+ elif str == '--grow':
+ grow = 1
+
+ self.partitions.append((extra[0], size, maxSize, grow))
+
+ self.addToSkipList("partition")
+
def __init__(self, file):
InstallClass.__init__(self)
self.addToSkipList("bootdisk")
self.addToSkipList("welcome")
+ self.partitions = []
self.installType = "install"
self.readKickstart(file)