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

[PATCH 1/3] Setup storage config when kickstart is parsed



From: "Brian C. Lane" <bcl redhat com>

---
 anaconda                       |   15 ++++++++++++++-
 pyanaconda/storage/__init__.py |   14 --------------
 2 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/anaconda b/anaconda
index 2a213fc..2056af3 100755
--- a/anaconda
+++ b/anaconda
@@ -51,7 +51,7 @@ def exitHandler(anaconda, exitCode=None):
             while True:
                 time.sleep(10000)
 
-    if anaconda.ksdata:
+    if anaconda.ksdata and not flags.imageInstall:
         from pykickstart.constants import KS_SHUTDOWN, KS_WAIT, KS_REBOOT
 
         if anaconda.ksdata.reboot.eject:
@@ -730,6 +730,19 @@ if __name__ == "__main__":
         anaconda.ksdata = kickstart.parseKickstart(anaconda, opts.ksfile)
         if anaconda.ksdata.rescue.rescue:
             anaconda.rescue = True
+
+        # Setup the storage config options from the kickstart file
+        anaconda.storage.config.zeroMbr = anaconda.ksdata.zerombr.zerombr
+        anaconda.storage.config.ignoreDiskInteractive = anaconda.ksdata.ignoredisk.interactive
+        anaconda.storage.config.ignoredDisks = anaconda.ksdata.ignoredisk.ignoredisk
+        anaconda.storage.config.exclusiveDisks = anaconda.ksdata.ignoredisk.onlyuse
+
+        if anaconda.ksdata.clearpart.type is not None:
+            anaconda.storage.config.clearPartType = anaconda.ksdata.clearpart.type
+            anaconda.storage.config.clearPartDisks = anaconda.ksdata.clearpart.drives
+            if anaconda.ksdata.clearpart.initAll:
+                anaconda.storage.config.reinitializeDisks = anaconda.ksdata.clearpart.initAll
+
     # now start the interface
     setupDisplay(anaconda, opts)
     # setting the install steps requires interface to be running
diff --git a/pyanaconda/storage/__init__.py b/pyanaconda/storage/__init__.py
index a40468f..6c51c63 100644
--- a/pyanaconda/storage/__init__.py
+++ b/pyanaconda/storage/__init__.py
@@ -80,20 +80,6 @@ def storageInitialize(anaconda):
     #     populate the udev db
     udev_trigger(subsystem="block", action="change")
 
-    # Before we set up the storage system, we need to know which disks to
-    # ignore, etc.  Luckily that's all in the kickstart data.
-    if anaconda.ksdata:
-        anaconda.storage.config.zeroMbr = anaconda.ksdata.zerombr.zerombr
-        anaconda.storage.config.ignoreDiskInteractive = anaconda.ksdata.ignoredisk.interactive
-        anaconda.storage.config.ignoredDisks = anaconda.ksdata.ignoredisk.ignoredisk
-        anaconda.storage.config.exclusiveDisks = anaconda.ksdata.ignoredisk.onlyuse
-
-        if anaconda.ksdata.clearpart.type is not None:
-            anaconda.storage.config.clearPartType = anaconda.ksdata.clearpart.type
-            anaconda.storage.config.clearPartDisks = anaconda.ksdata.clearpart.drives
-            if anaconda.ksdata.clearpart.initAll:
-                anaconda.storage.config.reinitializeDisks = anaconda.ksdata.clearpart.initAll
-
     anaconda.intf.resetInitializeDiskQuestion()
     anaconda.intf.resetReinitInconsistentLVMQuestion()
     lvm.lvm_vg_blacklist = []
-- 
1.7.6.4


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