[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.
---
 anaconda            |    1 +
 kickstart.py        |    9 ++++++---
 storage/__init__.py |    5 ++++-
 3 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/anaconda b/anaconda
index 17003c9..b55c0f9 100755
--- a/anaconda
+++ b/anaconda
@@ -1091,6 +1091,7 @@ if __name__ == "__main__":
         # 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.id.storage.zeroMbr = ksdata.zerombr.zerombr
+        anaconda.id.storage.ignoreDiskInteractive = ksdata.ignoredisk.interactive
         anaconda.id.storage.ignoredDisks = ksdata.ignoredisk.ignoredisk
         anaconda.id.storage.exclusiveDisks = ksdata.ignoredisk.onlyuse
 
diff --git a/kickstart.py b/kickstart.py
index 52e396f..89321e4 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -354,9 +354,9 @@ class Firstboot(commands.firstboot.FC3_Firstboot):
     def execute(self, anaconda):
         anaconda.id.firstboot = self.firstboot
 
-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 = []
@@ -382,9 +382,11 @@ class IgnoreDisk(commands.ignoredisk.F8_IgnoreDisk):
         return retval
 
     def execute(self, anaconda):
+        anaconda.id.storage.ignoreDiskInteractive = self.interactive
         anaconda.id.storage.ignoredDisks = self.ignoredisk
         anaconda.id.storage.exclusiveDisks = self.onlyuse
-        anaconda.id.ksdata.skipSteps.extend(["filter", "filtertype"])
+        if not self.interactive:
+            anaconda.id.ksdata.skipSteps.extend(["filter", "filtertype"])
 
 class Iscsi(commands.iscsi.F10_Iscsi):
     def parse(self, args):
@@ -1437,6 +1439,7 @@ def setSteps(anaconda):
         dispatch.skipStep("confirmupgrade")
         dispatch.skipStep("welcome")
 
+    if not interactive and not anaconda.id.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/storage/__init__.py b/storage/__init__.py
index f541014..c7863e0 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -245,6 +245,7 @@ class Storage(object):
         self.anaconda = anaconda
 
         # storage configuration variables
+        self.ignoreDiskInteractive = False
         self.ignoredDisks = []
         self.exclusiveDisks = []
         self.doAutoPart = False
@@ -1101,7 +1102,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