cmd-buildextend-live: update `kargs_json` when moving EFI `grub.cfg`
Otherwise, code lower down will remove the that `grub.cfg` from the list
of kargs files. This in turn will prevent `coreos-installer iso kargs`
from affecting kargs on UEFI boots.
Fixes ("cmd-buildextend-live: always change dir
`EFI/{vendor}/` to correct vendor id").
@@ -551,6 +551,11 @@ def generate_iso():
os.rename(srcpath, f"EFI/{vendor_id}", src_dir_fd=dfd, dst_dir_fd=dfd)
os.close(dfd)
+ # And update kargs.json
+ for file in kargs_json['files']:
+ if file['path'] == grubfilepath[0]:
+ file['path'] = f'EFI/{vendor_id}/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.
