From 720b10f07c4b4b335636760feb83f416fd66d7d6 Mon Sep 17 00:00:00 2001 From: Heitor Matsui Date: Mon, 11 Mar 2024 11:55:24 -0300 Subject: [PATCH] Fix pxe files copy and permission during upload This commit fixes an issue that was preventing load import script from copying the TO release pxe files correctly from the load, and also gives pxe-update-*.sh script execution permission to avoid permission denied errors during host-unlock. Test Plan PASS: upload TO release load, verify the TO release pxe.cfg.linux files are copied to /var and that /etc/pxe-update script is updated to 755 Story: 2010676 Task: 49698 Signed-off-by: Heitor Matsui Change-Id: I222b484d3a28c603ed8d7c42d0405481086735f0 --- software/scripts/usm_load_import | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/software/scripts/usm_load_import b/software/scripts/usm_load_import index d9a6419c..a3ad5b3d 100644 --- a/software/scripts/usm_load_import +++ b/software/scripts/usm_load_import @@ -127,7 +127,7 @@ def load_import(from_release, to_release, iso_mount_dir): # Copy to_release_feed/pxelinux.cfg.files to /var/pxeboot/pxelinux.cfg.files pxeboot_cfg_files = glob.glob(os.path.join(to_feed_dir, 'pxeboot', 'pxelinux.cfg.files', - '*' + from_major_rel)) + '*' + to_major_rel)) for pxeboot_cfg_file in pxeboot_cfg_files: if os.path.isfile(pxeboot_cfg_file): shutil.copyfile(pxeboot_cfg_file, os.path.join(VAR_PXEBOOT_DIR, @@ -139,6 +139,7 @@ def load_import(from_release, to_release, iso_mount_dir): pxeboot_update_filename = "pxeboot-update-%s.sh" % to_major_rel shutil.copyfile(os.path.join(to_feed_dir, "upgrades", pxeboot_update_filename), os.path.join("/etc", pxeboot_update_filename)) + os.chmod(os.path.join("/etc", pxeboot_update_filename), mode=0o755) LOG.info("Copied pxeboot-update-%s.sh to %s", to_major_rel, "/etc") except Exception as e: