summaryrefslogtreecommitdiffstats
path: root/fsset.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2002-05-07 00:14:42 +0000
committerJeremy Katz <katzj@redhat.com>2002-05-07 00:14:42 +0000
commitb5c7e1307f40563a6f78a47d3af29d4407e5ea3d (patch)
tree7da70c11f7fd4ab4bc0747bbd1329338c7eb9dc7 /fsset.py
parentbea3a58a0c1325334861303210ab6da73cd9f4c5 (diff)
downloadanaconda-b5c7e1307f40563a6f78a47d3af29d4407e5ea3d.tar.gz
anaconda-b5c7e1307f40563a6f78a47d3af29d4407e5ea3d.tar.xz
anaconda-b5c7e1307f40563a6f78a47d3af29d4407e5ea3d.zip
make the bootloader choices thing actually use the bootloader device order
so that we can do things like avoid saying the mbr is on a removable device. abstract out part of the fsset.bootloaderChoices logic so that it can be used without the bootloader object as needed
Diffstat (limited to 'fsset.py')
-rw-r--r--fsset.py21
1 files changed, 13 insertions, 8 deletions
diff --git a/fsset.py b/fsset.py
index be9bd4447..3cad41c90 100644
--- a/fsset.py
+++ b/fsset.py
@@ -906,10 +906,9 @@ class FileSystemSet:
return 1
return 0
- def bootloaderChoices(self, diskSet):
+ # return the "boot" devicce
+ def getBootDev(self):
mntDict = {}
- ret = {}
-
for entry in self.entries:
mntDict[entry.mountpoint] = entry.device
@@ -919,6 +918,12 @@ class FileSystemSet:
bootDev = mntDict['/boot']
else:
bootDev = mntDict['/']
+
+ return bootDev
+
+ def bootloaderChoices(self, diskSet, bl):
+ ret = {}
+ bootDev = self.getBootDev()
if bootDev.getName() == "LoopbackDevice":
return ret
@@ -927,18 +932,18 @@ class FileSystemSet:
return ret
ret['boot'] = (bootDev.device, N_("First sector of boot partition"))
- ret['mbr'] = (bootDev.device, N_("Master Boot Record (MBR)"))
+ ret['mbr'] = (bl.drivelist[0], N_("Master Boot Record (MBR)"))
return ret
# set active partition on disks
# if an active partition is set, leave it alone; if none set
# set either our boot partition or the first partition on the drive active
def setActive(self, diskset):
- choices = self.bootloaderChoices(diskset)
- if not choices:
- bootDev = None
+ dev = self.getBootDev()
+ if dev.getName() != "LoopbackDevice":
+ bootDev = dev.device
else:
- bootDev = choices['boot'][0]
+ bootDev = None
# stupid itanium
if iutil.getArch() == "ia64":