summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--kickstart.py20
2 files changed, 18 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 8f2936a2d..252b5d955 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2005-11-16 Chris Lumens <clumens@redhat.com>
+ * kickstart.py (Kickstart.runPreScripts): Don't give a progress bar
+ if there aren't any scripts to run.
+ (Kickstart.postAction): Likewise.
+
* sortedtransaction.py (SplitMediaTransactionData): Move after its
superclass. Fix indentation.
* yuminstall.py (YumSorter.doTsSetup): Use SplitMediaTransactionData
diff --git a/kickstart.py b/kickstart.py
index b2e84c47a..e0c7aaafa 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -657,28 +657,36 @@ class Kickstart(BaseInstallClass):
partitions.autoPartitionRequests.append(request)
def runPreScripts(self, intf = None):
+ preScripts = filter (lambda s: s.type == KS_SCRIPT_PRE,
+ self.ksdata.scripts)
+
+ if len(preScripts) == 0:
+ return
+
log.info("Running kickstart %%pre script(s)")
if intf is not None:
w = intf.waitWindow(_("Running..."),
_("Running pre-install scripts"))
- for script in filter (lambda s: s.type == KS_SCRIPT_PRE,
- self.ksdata.scripts):
- script.run("/", self.serial, intf)
+ map (lambda s: s.run("/", self.serial, intf), preScripts)
log.info("All kickstart %%pre script(s) have been run")
if intf is not None:
w.pop()
def postAction(self, rootPath, serial, intf = None):
+ postScripts = filter (lambda s: s.type == KS_SCRIPT_POST,
+ self.ksdata.scripts)
+
+ if len(postScripts) == 0:
+ return
+
log.info("Running kickstart %%post script(s)")
if intf is not None:
w = intf.waitWindow(_("Running..."),
_("Running post-install scripts"))
- for script in filter (lambda s: s.type == KS_SCRIPT_POST,
- self.ksdata.scripts):
- script.run(rootPath, serial, intf)
+ map (lambda s: s.run(rootPath, serial, intf), postScripts)
log.info("All kickstart %%post script(s) have been run")
if intf is not None: