FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 11-04-2011, 06:00 PM
David Lehman
 
Default Add --boot-drive option to bootloader command.

---
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@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 08:45 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org