Skip to content

Commit

Permalink
cmd-buildextend-live: update EFI/{distro}/grub.cfg to `EFI/centos/
Browse files Browse the repository at this point in the history
grub.cfg` for scos

Fix openshift/os#954
  • Loading branch information
HuijingHei committed Aug 29, 2022
1 parent 34c2ce5 commit 1132bd9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/cmd-buildextend-live
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,15 @@ def generate_iso():
if len(vendor_ids) != 1:
raise Exception(f"did not find exactly one EFI vendor ID: {vendor_ids}")

# scos: rename EFI/{distro} to EFI/centos
# https://github.com/openshift/os/issues/954
if base_name == "scos":
grubfilepath = ensure_glob(os.path.join(tmpdir, 'live/EFI/*/grub.cfg'))
if len(grubfilepath) != 1:
raise Exception(f'Found != 1 grub.cfg files: {grubfilepath}')
srcpath = os.path.dirname(grubfilepath[0])
os.renames(grubfilepath[0], os.path.join(os.path.dirname(srcpath), vendor_ids[0], "grub.cfg"))

# Delete fallback and its CSV file. Its purpose is to create
# EFI boot variables, which we don't want when booting from
# removable media.
Expand Down

0 comments on commit 1132bd9

Please sign in to comment.