summaryrefslogtreecommitdiffstats
path: root/kickstart.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2001-07-17 22:26:50 +0000
committerJeremy Katz <katzj@redhat.com>2001-07-17 22:26:50 +0000
commitd49a73331b92472951186b5a066653254e79a696 (patch)
treebc914b549d2a0cc7054bdb1faf49a41b806ae7ee /kickstart.py
parentcb11234d6973be5e95cd5fd7967d0393f429bb7b (diff)
downloadanaconda-d49a73331b92472951186b5a066653254e79a696.tar.gz
anaconda-d49a73331b92472951186b5a066653254e79a696.tar.xz
anaconda-d49a73331b92472951186b5a066653254e79a696.zip
fix mbr vs partition install of bootloader via kickstart
Diffstat (limited to 'kickstart.py')
-rw-r--r--kickstart.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/kickstart.py b/kickstart.py
index ed1b2a2cd..2b4af2b85 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -210,6 +210,7 @@ class KickstartBase(BaseInstallClass):
[ 'append=', 'location=', 'useLilo', '--lba32',
'password=', 'md5pass=', 'linear', 'nolinear'])
+ validLocations = [ "mbr", "partition", "none" ]
appendLine = None
location = "mbr"
useLilo = 0
@@ -223,8 +224,8 @@ class KickstartBase(BaseInstallClass):
if str == '--append':
appendLine = arg
elif str == '--location':
+ location = arg
# XXX need this to do something
- pass
elif str == '--useLilo':
useLilo = 1
elif str == '--lba32':
@@ -237,9 +238,15 @@ class KickstartBase(BaseInstallClass):
linear = 1
elif str == '--nolinear':
linear = 0
+
+ if location not in validLocations:
+ raise ValueError, "mbr, partition, or none expected for bootloader command"
+ if location == "none":
+ location = None
+ else:
+ location = validLocations.index(location)
-
- self.setBootloader(id, useLilo, forceLBA, password, md5pass, appendLine)
+ self.setBootloader(id, useLilo, location, forceLBA, password, md5pass, appendLine)
self.skipSteps.append("bootloader")
self.skipSteps.append("bootloaderpassword")