[PATCH] Support bootloader --leavebootorder for F18 and RHEL7 (#824801)

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

 



Add --leavebootorder to bootloader.
---
 pykickstart/commands/bootloader.py |   17 +++++++++++++++++
 pykickstart/handlers/control.py    |    4 ++--
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/pykickstart/commands/bootloader.py b/pykickstart/commands/bootloader.py
index bb40a18..8a660a8 100644
--- a/pykickstart/commands/bootloader.py
+++ b/pykickstart/commands/bootloader.py
@@ -216,6 +216,9 @@ class F15_Bootloader(F14_Bootloader):
         return op
 
 class F17_Bootloader(F15_Bootloader):
+    removedKeywords = F15_Bootloader.removedKeywords
+    removedAttrs = F15_Bootloader.removedAttrs
+
     def __init__(self, writePriority=10, *args, **kwargs):
         F15_Bootloader.__init__(self, writePriority, *args, **kwargs)
 
@@ -234,6 +237,20 @@ class F17_Bootloader(F15_Bootloader):
         op.add_option("--boot-drive", dest="bootDrive", default="")
         return op
 
+class F18_Bootloader(F17_Bootloader):
+    removedKeywords = F17_Bootloader.removedKeywords
+    removedAttrs = F17_Bootloader.removedAttrs
+
+    def __init__(self, writePriority=10, *args, **kwargs):
+        F17_Bootloader.__init__(self, writePriority, *args, **kwargs)
+
+        self.leavebootorder = kwargs.get("leavebootorder", False)
+
+    def _getParser(self):
+        op = F17_Bootloader._getParser(self)
+        op.add_option("--leavebootorder", dest="leavebootorder", action="store_true", default=False)
+        return op
+
 class RHEL5_Bootloader(FC4_Bootloader):
     removedKeywords = FC4_Bootloader.removedKeywords
     removedAttrs = FC4_Bootloader.removedAttrs
diff --git a/pykickstart/handlers/control.py b/pykickstart/handlers/control.py
index 9b39b10..d18bb56 100644
--- a/pykickstart/handlers/control.py
+++ b/pykickstart/handlers/control.py
@@ -890,7 +890,7 @@ commandMap = {
         "authconfig": authconfig.FC3_Authconfig,
         "autopart": autopart.F17_AutoPart,
         "autostep": autostep.FC3_AutoStep,
-        "bootloader": bootloader.F17_Bootloader,
+        "bootloader": bootloader.F18_Bootloader,
         "btrfs": btrfs.F17_BTRFS,
         "cdrom": method.F14_Method,
         "clearpart": clearpart.F17_ClearPart,
@@ -1171,7 +1171,7 @@ commandMap = {
         "authconfig": authconfig.FC3_Authconfig,
         "autopart": autopart.F16_AutoPart,
         "autostep": autostep.FC3_AutoStep,
-        "bootloader": bootloader.F15_Bootloader,
+        "bootloader": bootloader.F17_Bootloader,
         "cdrom": method.F14_Method,
         "clearpart": clearpart.FC3_ClearPart,
         "cmdline": displaymode.FC3_DisplayMode,
-- 
1.7.10.2

_______________________________________________
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