xen.efi upgraded during each install

(cherry picked from commit e3a4a46958)
This commit is contained in:
Freddie Rice 2017-09-20 12:59:09 -04:00 committed by Marek Marczykowski-Górecki
parent 408590f0d4
commit 12466386d7
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -1819,8 +1819,11 @@ class XenEFI(EFIGRUB):
boot_part_num = self.stage1_device.parents[0].partedPartition.number
boot_part_num = str(boot_part_num)
if not os.path.exists(
"{}/{}".format(iutil.getSysroot() + self.config_dir, "xen.efi")):
# could be an old version, replace in case
xen_efi_target = "{}/{}".format(iutil.getSysroot() + self.config_dir, "xen.efi")
if os.path.exists(xen_efi_target):
os.remove(xen_efi_target)
xen_efi = [x for x in os.listdir(iutil.getSysroot() + self.config_dir) if
x.startswith('xen-') and x.endswith('.efi')][0]
shutil.copy("{}/{}".format(iutil.getSysroot() + self.config_dir, xen_efi),