summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bootloader.py10
-rw-r--r--kickstart.py4
2 files changed, 7 insertions, 7 deletions
diff --git a/bootloader.py b/bootloader.py
index 7e3ebfeb3..e834fb5ce 100644
--- a/bootloader.py
+++ b/bootloader.py
@@ -45,13 +45,13 @@ def bootloaderSetupChoices(dispatch, bl, fsset, diskSet, dir):
bl.images.setup(diskSet, fsset)
- # XXX fix mbr vs boot handling here
if bl.defaultDevice != None and choices:
keys = choices.keys()
-# if bl.defaultDevice > len(keys)
- if "mbr" in keys:
- bl.defaultDevice = "mbr"
- else:
+ # there are only two possible things that can be in the keys
+ # mbr and boot. boot is ALWAYS present. so if the dev isn't
+ # listed, it was mbr and we should nicely fall back to boot
+ if bl.defaultDevice not in keys:
+ log("MBR not suitable as boot device; installing to partition")
bl.defaultDevice = "boot"
bl.setDevice(choices[bl.defaultDevice][0])
diff --git a/kickstart.py b/kickstart.py
index 38120ad6e..b2beaf159 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -270,8 +270,8 @@ class KickstartBase(BaseInstallClass):
raise ValueError, "mbr, partition, or none expected for bootloader command"
if location == "none":
location = None
- else:
- location = validLocations.index(location)
+ elif location == "partition":
+ location = "boot"
if upgrade and not id.upgrade.get():
raise RuntimeError, "Selected upgrade mode for bootloader but not doing an upgrade"