xen.efi upgraded during each install

This commit is contained in:
Freddie Rice 2017-09-20 12:59:09 -04:00
parent 1c18b82b5e
commit e3a4a46958
No known key found for this signature in database
GPG Key ID: F370121E59F2052F

View File

@ -1852,8 +1852,11 @@ class XenEFI(EFIGRUB):
boot_part_num = self.stage1_device.parents[0].parted_partition.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),