From 3f92666dcb0171105dfc38eff8b31fec2c983e92 Mon Sep 17 00:00:00 2001 From: Erik Troan Date: Wed, 1 Sep 1999 00:24:43 +0000 Subject: changes to make partitioning work in kickstart --- kickstart.py | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'kickstart.py') 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) -- cgit