Skip to content

Commit 3991e6f

Browse files
HuijingHeicgwalters
authored andcommitted
cmd-buildextend-live: always change dir EFI/{vendor}/ to correct
vendor id Fix openshift/os#954
1 parent bf828c2 commit 3991e6f

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/cmd-buildextend-live

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,14 @@ def generate_iso():
524524
if len(vendor_ids) != 1:
525525
raise Exception(f"did not find exactly one EFI vendor ID: {vendor_ids}")
526526

527+
# Always replace live/EFI/{vendor} to actual live/EFI/{vendor_id[0]}
528+
# https://github.com/openshift/os/issues/954
529+
grubfilepath = ensure_glob(os.path.join(tmpdir, 'live/EFI/*/grub.cfg'))
530+
if len(grubfilepath) != 1:
531+
raise Exception(f'Found != 1 grub.cfg files: {grubfilepath}')
532+
srcpath = os.path.dirname(grubfilepath[0])
533+
os.renames(srcpath, os.path.join(os.path.dirname(srcpath), vendor_ids[0]))
534+
527535
# Delete fallback and its CSV file. Its purpose is to create
528536
# EFI boot variables, which we don't want when booting from
529537
# removable media.

0 commit comments

Comments
 (0)