[PATCH 13/13] Move some kickstart-specific storage init into storageInitialization.

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

 



The external storage testing work is using kickstart to specify what partitions
to set up.  In order for kickstart to work correctly, all this code would need
to be duplicated in every test case.  It's also pretty annoying that it's a
part of __main__ instead of storageInitialize.  Therefore, move it.
---
 anaconda-bin        |   13 -------------
 storage/__init__.py |   12 ++++++++++++
 2 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/anaconda-bin b/anaconda-bin
index ff557fe..a064679 100755
--- a/anaconda-bin
+++ b/anaconda-bin
@@ -856,19 +856,6 @@ if __name__ == "__main__":
 
     if anaconda.ksdata:
         import storage
-
-        # Before we set up the storage system, we need to know which disks to
-        # ignore, etc.  Luckily that's all in the kickstart data.
-        anaconda.storage.zeroMbr = anaconda.ksdata.zerombr.zerombr
-        anaconda.storage.ignoredDisks = anaconda.ksdata.ignoredisk.ignoredisk
-        anaconda.storage.exclusiveDisks = anaconda.ksdata.ignoredisk.onlyuse
-
-        if anaconda.ksdata.clearpart.type is not None:
-            anaconda.storage.clearPartType = anaconda.ksdata.clearpart.type
-            anaconda.storage.clearPartDisks = anaconda.ksdata.clearpart.drives
-            if anaconda.ksdata.clearpart.initAll:
-                anaconda.storage.reinitializeDisks = anaconda.ksdata.clearpart.initAll
-
         storage.storageInitialize(anaconda)
 
         # Now having initialized storage, we can apply all the other kickstart
diff --git a/storage/__init__.py b/storage/__init__.py
index 8470201..ebbf9ed 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -80,6 +80,18 @@ 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.zeroMbr = anaconda.ksdata.zerombr.zerombr
+        anaconda.storage.ignoredDisks = anaconda.ksdata.ignoredisk.ignoredisk
+        anaconda.storage.exclusiveDisks = anaconda.ksdata.ignoredisk.onlyuse
+
+        if anaconda.ksdata.clearpart.type is not None:
+            anaconda.storage.clearPartType = anaconda.ksdata.clearpart.type
+            anaconda.storage.clearPartDisks = anaconda.ksdata.clearpart.drives
+            if anaconda.ksdata.clearpart.initAll:
+                anaconda.storage.reinitializeDisks = anaconda.ksdata.clearpart.initAll
 
     anaconda.intf.resetInitializeDiskQuestion()
     anaconda.intf.resetReinitInconsistentLVMQuestion()
-- 
1.6.5.1

_______________________________________________
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