[PATCH] Allow ignoredisk to be interactive without the rest of the UI (#596804)

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

 



People run ks.cfg with no partitioning section all the time and expect
to get the partitioning screen; this allows that to (conditionally) include
the device filtering UI.
---
 pyanaconda/kickstart.py        |    9 ++++++---
 pyanaconda/storage/__init__.py |    6 +++++-
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index f1a1238..bf5e580 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -351,9 +351,9 @@ class Firewall(commands.firewall.F10_Firewall):
         for svc in self.services:
             anaconda.firewall.servicelist.append (svc)
 
-class IgnoreDisk(commands.ignoredisk.F8_IgnoreDisk):
+class IgnoreDisk(commands.ignoredisk.RHEL6_IgnoreDisk):
     def parse(self, args):
-        retval = commands.ignoredisk.F8_IgnoreDisk.parse(self, args)
+        retval = commands.ignoredisk.RHEL6_IgnoreDisk.parse(self, args)
 
         # See comment in ClearPart.parse
         drives = []
@@ -379,9 +379,11 @@ class IgnoreDisk(commands.ignoredisk.F8_IgnoreDisk):
         return retval
 
     def execute(self, anaconda):
+        anaconda.storage.ignoreDiskInteractive = self.interactive
         anaconda.storage.ignoredDisks = self.ignoredisk
         anaconda.storage.exclusiveDisks = self.onlyuse
-        anaconda.ksdata.skipSteps.extend(["filter", "filtertype"])
+        if not self.interactive:
+            anaconda.ksdata.skipSteps.extend(["filter", "filtertype"])
 
 class Iscsi(commands.iscsi.F10_Iscsi):
     def parse(self, args):
@@ -1432,6 +1434,7 @@ def setSteps(anaconda):
         # Don't show confirmation screens on non-interactive installs.
         dispatch.skipStep("welcome")
 
+    if not interactive and not anaconda.storage.ignoreDiskInteractive:
         # Since ignoredisk is optional and not specifying it means you want to
         # consider all possible disks, we should not stop on the filter steps
         # unless it's an interactive install.
diff --git a/pyanaconda/storage/__init__.py b/pyanaconda/storage/__init__.py
index 38bce75..5b8d738 100644
--- a/pyanaconda/storage/__init__.py
+++ b/pyanaconda/storage/__init__.py
@@ -84,6 +84,7 @@ def storageInitialize(anaconda):
     # ignore, etc.  Luckily that's all in the kickstart data.
     if anaconda.ksdata:
         anaconda.storage.zeroMbr = anaconda.ksdata.zerombr.zerombr
+        anaconda.storage.ignoreDiskInteractive = ksdata.ignoredisk.interactive
         anaconda.storage.ignoredDisks = anaconda.ksdata.ignoredisk.ignoredisk
         anaconda.storage.exclusiveDisks = anaconda.ksdata.ignoredisk.onlyuse
 
@@ -258,6 +259,7 @@ class Storage(object):
         self.anaconda = anaconda
 
         # storage configuration variables
+        self.ignoreDiskInteractive = False
         self.ignoredDisks = []
         self.exclusiveDisks = []
         self.doAutoPart = False
@@ -1110,7 +1112,9 @@ class Storage(object):
         f.write("#clearpart %s\n" % " ".join(args))
 
         # ignoredisks
-        if self.ignoredDisks:
+        if self.ignoreDiskInteractive:
+            f.write("#ignoredisk --interactive\n")
+        elif self.ignoredDisks:
             f.write("#ignoredisk --drives=%s\n" % ",".join(self.ignoredDisks))
         elif self.exclusiveDisks:
             f.write("#ignoredisk --only-use=%s\n" % ",".join(self.exclusiveDisks))
-- 
1.7.0.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