[master 2/3] [EFIGRUB] Use self.stage1_device where appropriate.

Peter Jones pjones at redhat.com
Wed Sep 5 16:35:34 UTC 2012


Related: rhbz#853308
---
 pyanaconda/bootloader.py | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index f0c1ac2..21f3edd 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -1595,15 +1595,14 @@ class EFIGRUB(GRUB2):
         return ret.replace('/', '\\')
 
     def add_efi_boot_target(self):
-        boot_efi = self.storage.mountpoints["/boot/efi"]
-        if boot_efi.type == "partition":
+        if self.stage1_device.type == "partition":
             boot_disk = boot_efi.disk
-            boot_part_num = boot_efi.partedPartition.number
-        elif boot_efi.type == "mdarray":
+            boot_part_num = self.stage1_device.partedPartition.number
+        elif self.stage1_device.type == "mdarray":
             # FIXME: I'm just guessing here. This probably needs the full
             #        treatment, ie: multiple targets for each member.
-            boot_disk = boot_efi.parents[0].disk
-            boot_part_num = boot_efi.parents[0].partedPartition.number
+            boot_disk = self.stage1_device.parents[0].disk
+            boot_part_num = self.stage1_device.parents[0].partedPartition.number
         boot_part_num = str(boot_part_num)
 
         rc = self.efibootmgr("-c", "-w", "-L", productName,
-- 
1.7.11.4



More information about the anaconda-patches mailing list