From 9bbb60f063640f7f978ba0dbeef11914338a9d20 Mon Sep 17 00:00:00 2001 From: Bin Qian Date: Tue, 15 Jul 2025 20:23:28 +0000 Subject: [PATCH] Properly copy deploy scripts from pxeserver feed Currently when download from a pxeserver feed, the remote directory structure is also downloaded. This fix will ensure scripts are download flat in /upgrades/software-deploy directory. Closes-Bug: 2116979 TCs: passed: observed scripts are properly copied to /upgrades/software-deploy directory after installed from pxeserver. Signed-off-by: Bin Qian Change-Id: I5c6beff1a670ead5a545d7c94417ce240d5d831f --- kickstart/files/kickstart.cfg | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kickstart/files/kickstart.cfg b/kickstart/files/kickstart.cfg index eae4d3b0..d9b1f4df 100644 --- a/kickstart/files/kickstart.cfg +++ b/kickstart/files/kickstart.cfg @@ -3185,8 +3185,10 @@ else if [ $? -eq 0 ]; then ilog "Downloading USM upgrades directory from ${upgrade_url}" cd ${feed}/upgrades - wget ${NOVERIFYSSL_WGET_OPT} -r -np -nH --cut-dirs=3 -R "index.html*" \ + to_cut=$(echo "${upgrade_url#*://}" | cut -d/ -f2- | awk -F/ '{print NF}') + wget ${NOVERIFYSSL_WGET_OPT} -r -np -nH --cut-dirs=${to_cut} -R "index.html*" \ ${upgrade_url}/ -o /${LAT_DIR}/wget_usm_upgrades.log + ilog "USM upgrades directory download complete" chmod 755 ./software-deploy/* ilog "The file permissions in the ${feed}/upgrades/software-deploy/ directory are configured to 755."