diff options
| author | Adrian Dudau <adrian.dudau@enea.com> | 2013-12-12 13:38:32 +0100 |
|---|---|---|
| committer | Adrian Dudau <adrian.dudau@enea.com> | 2013-12-12 13:50:20 +0100 |
| commit | e2e6f6fe07049f33cb6348780fa975162752e421 (patch) | |
| tree | b1813295411235d1297a0ed642b1346b24fdfb12 /scripts/lib/mic/kickstart/custom_commands/micboot.py | |
| download | poky-e2e6f6fe07049f33cb6348780fa975162752e421.tar.gz | |
initial commit of Enea Linux 3.1
Migrated from the internal git server on the dora-enea branch
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'scripts/lib/mic/kickstart/custom_commands/micboot.py')
| -rw-r--r-- | scripts/lib/mic/kickstart/custom_commands/micboot.py | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/scripts/lib/mic/kickstart/custom_commands/micboot.py b/scripts/lib/mic/kickstart/custom_commands/micboot.py new file mode 100644 index 0000000000..66d1678aa7 --- /dev/null +++ b/scripts/lib/mic/kickstart/custom_commands/micboot.py | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | #!/usr/bin/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 | |||
| 20 | from pykickstart.base import * | ||
| 21 | from pykickstart.errors import * | ||
| 22 | from pykickstart.options import * | ||
| 23 | from pykickstart.commands.bootloader import * | ||
| 24 | |||
| 25 | class 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", type="string") | ||
| 48 | return op | ||
| 49 | |||
