neil / rpms / anaconda

Forked from rpms/anaconda a year ago
Clone
fbcaed
From 1e3e73a6a939286c7ee3f7ea78dc5431501981eb Mon Sep 17 00:00:00 2001
fbcaed
From: Colin Walters <walters@verbum.org>
fbcaed
Date: Sun, 19 Oct 2014 21:01:22 -0400
fbcaed
Subject: [PATCH 5/5] bootloader: Bridge efi_dir configuration earlier for
fbcaed
 rpmostreepayload
fbcaed
fbcaed
rpmostreepayload wants a stub bootloader configuration to be written,
fbcaed
then it updates it.  There is a bit of magic in the middle of
fbcaed
bootloader.py to bridge the install class' efi_dir to the bootloader
fbcaed
configuration - we just need to set this up before calling
fbcaed
writeBootLoaderFinal().
fbcaed
fbcaed
Otherwise the config ends up in BOOT, which doesn't work.
fbcaed
---
fbcaed
 pyanaconda/bootloader.py | 6 ++++--
fbcaed
 1 file changed, 4 insertions(+), 2 deletions(-)
fbcaed
fbcaed
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
fbcaed
index 29004b1..24ae3f9 100644
fbcaed
--- a/pyanaconda/bootloader.py
fbcaed
+++ b/pyanaconda/bootloader.py
fbcaed
@@ -2387,6 +2387,10 @@ def writeBootLoader(storage, payload, instClass, ksdata):
fbcaed
         stage2_device = storage.bootloader.stage2_device
fbcaed
         log.info("bootloader stage2 target device is %s" % stage2_device.name)
fbcaed
 
fbcaed
+    # Bridge storage EFI configuration to bootloader
fbcaed
+    if hasattr(storage.bootloader, 'efi_dir'):
fbcaed
+        storage.bootloader.efi_dir = instClass.efi_dir
fbcaed
+
fbcaed
     if isinstance(payload, RPMOSTreePayload):
fbcaed
         if storage.bootloader.skip_bootloader:
fbcaed
             log.info("skipping bootloader install per user request")
fbcaed
@@ -2413,8 +2417,6 @@ def writeBootLoader(storage, payload, instClass, ksdata):
fbcaed
                                          short=base_short_label)
fbcaed
     storage.bootloader.add_image(default_image)
fbcaed
     storage.bootloader.default = default_image
fbcaed
-    if hasattr(storage.bootloader, 'efi_dir'):
fbcaed
-        storage.bootloader.efi_dir = instClass.efi_dir
fbcaed
 
fbcaed
     # write out /etc/sysconfig/kernel
fbcaed
     writeSysconfigKernel(storage, version)
fbcaed
-- 
fbcaed
1.8.3.1
fbcaed