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 26, 2022
1 parent 04d0007 commit 4da384a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/cmd-buildextend-live
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,16 @@ if base_name == "rhcos" and args.fast:
currently only available for FCOS")
sys.exit(1)

# scos: rename EFI/{distro} to EFI/centos
# https://github.com/openshift/os/issues/954
if base_name == "scos":
grubfilepath = ensure_glob(os.path.join(srcdir_prefix, 'EFI/*/grub.cfg'))
if len(grubfilepath) != 1:
raise Exception(f'Found != 1 grub.cfg files: {grubfilepath}')
# src/config/live/EFI/{redhat -> centos}
efipath = os.path.dirname(grubfilepath[0])
os.rename(efipath, os.path.dirname(efipath) + "/centos/")

# used to lock
build_semaphore = os.path.join(buildmeta.build_dir, ".live.building")
if os.path.exists(build_semaphore):
Expand Down

0 comments on commit 4da384a

Please sign in to comment.