summaryrefslogtreecommitdiffstats
path: root/kickstart.py
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>1999-09-09 16:09:44 +0000
committerErik Troan <ewt@redhat.com>1999-09-09 16:09:44 +0000
commitc71e2378fa050757e8142c9a44b794281ed4bff1 (patch)
treed50610c1e97479e53764ce817cbf8e73f23187c2 /kickstart.py
parentea17a078eeb14a6b844abbc2cad58706a6bf2631 (diff)
downloadanaconda-c71e2378fa050757e8142c9a44b794281ed4bff1.tar.gz
anaconda-c71e2378fa050757e8142c9a44b794281ed4bff1.tar.xz
anaconda-c71e2378fa050757e8142c9a44b794281ed4bff1.zip
run post scripts for kickstart
Diffstat (limited to 'kickstart.py')
-rw-r--r--kickstart.py45
1 files changed, 37 insertions, 8 deletions
diff --git a/kickstart.py b/kickstart.py
index 2ef6d5998..ff9951508 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -241,14 +241,43 @@ class Kickstart(InstallClass):
"zerombr" : self.doZeroMbr ,
}
+ where = "commands"
+ packages = []
+ groups = []
+ post = ""
+ postInChroot = 1
for n in open(file).readlines():
- n = n[:len(n) - 1] # chop
-
- args = isys.parseArgv(n)
- if not args or args[0][0] == '#': continue
-
- cmd = args[0]
- if handlers[cmd]: handlers[cmd](args[1:])
+ if where == "post":
+ post = post + n
+ else:
+ n = n[:len(n) - 1] # chop
+
+ args = isys.parseArgv(n)
+ if not args or args[0][0] == '#': continue
+
+ if where == "commands":
+ cmd = args[0]
+ if cmd == "%packages":
+ where = "packages"
+ elif handlers[cmd]:
+ handlers[cmd](args[1:])
+ elif where == "packages":
+ if n[0:5] == "%post":
+ args = isys.parseArgv(n)
+ if len(args) >= 2 and args[1] == "--nochroot":
+ postInChroot = 0
+ where = "post"
+ elif n[0] == '@':
+ n = n[1:]
+ while n[0] == ' ':
+ n = n[1:]
+ groups.append(n)
+ else:
+ packages.append(n)
+
+ self.setGroups(groups)
+ self.setPackages(packages)
+ self.setPostScript(post, postInChroot)
def doClearPart(self, args):
if args[0] == '--linux':
@@ -292,7 +321,7 @@ class Kickstart(InstallClass):
self.readKickstart(file)
self.setGroups(["Base"])
- self.addToSkipList("package-selection")
+ #self.addToSkipList("package-selection")
# need to take care of:
#[ "lilo", "mouse", "network", "complete",