Re: [master] Turn sshd setup, kicstart execution and the rescue mode into dispatch steps.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/03/2011 09:34 PM, Chris Lumens wrote:
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index 0dfecd2..8e058bb 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -1203,6 +1203,14 @@ class AnacondaKSHandler(superclass):
                                       "configuration file:\n\n%s") % e)
                  sys.exit(1)

+    def setSteps(self):
+        for n in self.skipSteps:
+            self.anaconda.dispatch.skipStep(n)
+        for n in self.permanentSkipSteps:
+            self.anaconda.dispatch.skipStep(n, permanent=1)
+        for n in self.showSteps:
+            self.anaconda.dispatch.skipStep(n, skip = 0)
+
  class AnacondaPreParser(KickstartParser):
      # A subclass of KickstartParser that only looks for %pre scripts and
      # sets them up to be run.  All other scripts and commands are ignored.

I don't think it's a problem, but I'm curious why you have a setSteps in
the handler and then also one in kickstart.py.  What's the reasoning
behind splitting it up?

The setSteps() directly in kickstart.py is the one called to initialize most of the install steps, right after we discover this is a kickstart installation and parse the file (mostly to know whether this is upgrade or not). It really just calls installclass's setSteps and then selectively skips some of them.

The setSteps() in handler carries out skipping/showing of steps as requested during executing kickstart actions. This is very dynamic and depends a lot on what commands were specified in the kickstart (those in theory could be moved to the kickstart's setSteps()) and sometimes their parameters (see the Bootloader command). I yet need to inspect this in detail, I'm still working on this feature.

But in one sentence the answer is: the first is for the default kickstart setup, the second one is dynamic, based on how carrying out the kickstart commands turns out.


It only kind of reminds me of the bad old days where kickstart was an
install class.

To me, having kickstart as an install class in its own right doesn't make much sense. But it makes sense to have the list of default kickstart steps specified there, which is what we have with kickstart calling the installclass's setStep().

Ales
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux