[pykickstart][PATCH] Add --boot-drive option to bootloader command.

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

 



---
 pykickstart/commands/bootloader.py |   19 +++++++++++++++++++
 pykickstart/handlers/control.py    |    2 +-
 2 files changed, 20 insertions(+), 1 deletions(-)

diff --git a/pykickstart/commands/bootloader.py b/pykickstart/commands/bootloader.py
index b227fac..bb40a18 100644
--- a/pykickstart/commands/bootloader.py
+++ b/pykickstart/commands/bootloader.py
@@ -215,6 +215,25 @@ class F15_Bootloader(F14_Bootloader):
         op.add_option("--md5pass", action="callback", callback=password_cb, nargs=1, type="string")
         return op
 
+class F17_Bootloader(F15_Bootloader):
+    def __init__(self, writePriority=10, *args, **kwargs):
+        F15_Bootloader.__init__(self, writePriority, *args, **kwargs)
+
+        self.bootDrive = kwargs.get("bootDrive", "")
+
+    def _getArgsAsStr(self):
+        ret = F15_Bootloader._getArgsAsStr(self)
+
+        if self.bootDrive:
+            ret += " --boot-drive=%s" % self.bootDrive
+
+        return ret
+
+    def _getParser(self):
+        op = F15_Bootloader._getParser(self)
+        op.add_option("--boot-drive", dest="bootDrive", default="")
+        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 0a0c494..ed77b4f 100644
--- a/pykickstart/handlers/control.py
+++ b/pykickstart/handlers/control.py
@@ -769,7 +769,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.3.4

_______________________________________________
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