From 8842f3f725af9dbfc41ce884da520f97a53d2a4f Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Mon, 21 Jan 2002 21:24:40 +0000 Subject: land boot loader changes to use booty backend infrastructure and switch over to new screens. tagged as before_bootloader_merge and after_bootloader_merge appropriately --- fsset.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'fsset.py') diff --git a/fsset.py b/fsset.py index 2912b3047..5e30374eb 100644 --- a/fsset.py +++ b/fsset.py @@ -712,6 +712,7 @@ class FileSystemSet: def bootloaderChoices(self, diskSet): mntDict = {} + ret = {} for entry in self.entries: mntDict[entry.mountpoint] = entry.device @@ -724,13 +725,14 @@ class FileSystemSet: bootDev = mntDict['/'] if bootDev.getName() == "LoopbackDevice": - return None + return ret elif bootDev.getName() == "RAIDDevice": - return [ ( bootDev.device, "RAID Device" ) ] - - return [ (diskSet.driveList()[0], N_("Master Boot Record (MBR)") ), - (bootDev.device, N_("First sector of boot partition")) - ] + ret['boot'] = (bootDev.device, N_("RAID Device")) + return ret + + ret['boot'] = (bootDev.device, N_("First sector of boot partition")) + ret['mbr'] = (bootDev.device, N_("Master Boot Record (MBR)")) + return ret # set active partition on disks # if an active partition is set, leave it alone; if none set @@ -739,10 +741,8 @@ class FileSystemSet: choices = self.bootloaderChoices(diskset) if not choices: bootDev = None - elif len(choices) == 1: - bootDev = self.bootloaderChoices(diskset)[0][0] else: - bootDev = self.bootloaderChoices(diskset)[1][0] + bootDev = choices['boot'][0] # stupid itanium if iutil.getArch() == "ia64": -- cgit