summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/wic/kickstart/custom_commands/micboot.py50
-rw-r--r--scripts/lib/wic/kickstart/custom_commands/wicboot.py23
2 files changed, 15 insertions, 58 deletions
diff --git a/scripts/lib/wic/kickstart/custom_commands/micboot.py b/scripts/lib/wic/kickstart/custom_commands/micboot.py
deleted file mode 100644
index 1fa282b2f6..0000000000
--- a/scripts/lib/wic/kickstart/custom_commands/micboot.py
+++ /dev/null
@@ -1,50 +0,0 @@
1#!/usr/bin/env python -tt
2#
3# Copyright (c) 2008, 2009, 2010 Intel, Inc.
4#
5# Anas Nashif
6#
7# This program is free software; you can redistribute it and/or modify it
8# under the terms of the GNU General Public License as published by the Free
9# Software Foundation; version 2 of the License
10#
11# This program is distributed in the hope that it will be useful, but
12# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14# for more details.
15#
16# You should have received a copy of the GNU General Public License along
17# with this program; if not, write to the Free Software Foundation, Inc., 59
18# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
20from pykickstart.base import *
21from pykickstart.errors import *
22from pykickstart.options import *
23from pykickstart.commands.bootloader import *
24
25class Mic_Bootloader(F8_Bootloader):
26 def __init__(self, writePriority=10, appendLine="", driveorder=None,
27 forceLBA=False, location="", md5pass="", password="",
28 upgrade=False, menus=""):
29 F8_Bootloader.__init__(self, writePriority, appendLine, driveorder,
30 forceLBA, location, md5pass, password, upgrade)
31
32 self.menus = ""
33 self.ptable = "msdos"
34
35 def _getArgsAsStr(self):
36 ret = F8_Bootloader._getArgsAsStr(self)
37
38 if self.menus == "":
39 ret += " --menus=%s" %(self.menus,)
40 if self.ptable:
41 ret += " --ptable=\"%s\"" %(self.ptable,)
42 return ret
43
44 def _getParser(self):
45 op = F8_Bootloader._getParser(self)
46 op.add_option("--menus", dest="menus")
47 op.add_option("--ptable", dest="ptable", choices=("msdos", "gpt"),
48 default="msdos")
49 return op
50
diff --git a/scripts/lib/wic/kickstart/custom_commands/wicboot.py b/scripts/lib/wic/kickstart/custom_commands/wicboot.py
index f1914169d8..eefd574880 100644
--- a/scripts/lib/wic/kickstart/custom_commands/wicboot.py
+++ b/scripts/lib/wic/kickstart/custom_commands/wicboot.py
@@ -27,29 +27,36 @@
27from pykickstart.base import * 27from pykickstart.base import *
28from pykickstart.errors import * 28from pykickstart.errors import *
29from pykickstart.options import * 29from pykickstart.options import *
30from pykickstart.commands.bootloader import * 30from pykickstart.commands.bootloader import F8_Bootloader
31 31
32from wic.kickstart.custom_commands.micboot import * 32class Wic_Bootloader(F8_Bootloader):
33
34class Wic_Bootloader(Mic_Bootloader):
35 def __init__(self, writePriority=10, appendLine="", driveorder=None, 33 def __init__(self, writePriority=10, appendLine="", driveorder=None,
36 forceLBA=False, location="", md5pass="", password="", 34 forceLBA=False, location="", md5pass="", password="",
37 upgrade=False, menus=""): 35 upgrade=False, menus=""):
38 Mic_Bootloader.__init__(self, writePriority, appendLine, driveorder, 36 F8_Bootloader.__init__(self, writePriority, appendLine, driveorder,
39 forceLBA, location, md5pass, password, upgrade) 37 forceLBA, location, md5pass, password, upgrade)
40 38
39 self.menus = ""
40 self.ptable = "msdos"
41 self.source = "" 41 self.source = ""
42 42
43 def _getArgsAsStr(self): 43 def _getArgsAsStr(self):
44 retval = Mic_Bootloader._getArgsAsStr(self) 44 retval = F8_Bootloader._getArgsAsStr(self)
45 45
46 if self.menus == "":
47 retval += " --menus=%s" %(self.menus,)
48 if self.ptable:
49 retval += " --ptable=\"%s\"" %(self.ptable,)
46 if self.source: 50 if self.source:
47 retval += " --source=%s" % self.source 51 retval += " --source=%s" % self.source
48 52
49 return retval 53 return retval
50 54
51 def _getParser(self): 55 def _getParser(self):
52 op = Mic_Bootloader._getParser(self) 56 op = F8_Bootloader._getParser(self)
57 op.add_option("--menus", dest="menus")
58 op.add_option("--ptable", dest="ptable", choices=("msdos", "gpt"),
59 default="msdos")
53 # use specified source plugin to implement bootloader-specific methods 60 # use specified source plugin to implement bootloader-specific methods
54 op.add_option("--source", type="string", action="store", 61 op.add_option("--source", type="string", action="store",
55 dest="source", default=None) 62 dest="source", default=None)