Rename parameter tagged_mcp_version to mcp_tagged_version for offline image
Rename parameter to avoid any issues with regexp for mcp_version
parameters. Also fix symlink to update/<VERSION> repo for tag.
Change-Id: I7795eebb5c7983630be6cf8d4fb207df2a91baaf
Related-Prod: PROD-34366
diff --git a/mirror-image/scripts/mirrors.sh b/mirror-image/scripts/mirrors.sh
index 8358e87..b01ddbe 100644
--- a/mirror-image/scripts/mirrors.sh
+++ b/mirror-image/scripts/mirrors.sh
@@ -28,7 +28,7 @@
CUR_V=$(salt-call pillar.get _param:mcp_version --out text | awk '{print $2}')
# get tagged mcp_version for current latest MU 2019.2.x
-CUR_T=$(salt-call pillar.get _param:tagged_mcp_version --out text | awk '{print $2}')
+CUR_T=$(salt-call pillar.get _param:mcp_tagged_version --out text | awk '{print $2}')
# Enable 'update' hook.
# Those would prevent failures for 2018q3+ model releases, where
# 'system.linux.system.repo.mcp.apt_mirantis.update.xxx' enabled by default
@@ -37,9 +37,9 @@
ln -s ../${CUR_V} update/${CUR_V} || true
if [[ -n "${CUR_T}" ]]; then
ln -s ${CUR_V} ${CUR_T}
- # usually should be just ln -s update/${CUR_V} update/${CUR_T} - but need to specify dir in case of proposed testing
+ # usually should be just ln -s ../update/${CUR_V} update/${CUR_T} - but need to specify dir in case of proposed testing
UPDATE_DIR=$(salt-call pillar.get _param:debmirror_mirrors_update_target_dir --out text | awk '{print $2}')
- ln -s ${UPDATE_DIR} update/${CUR_T}
+ ln -s ../update/$(basename ${UPDATE_DIR}) update/${CUR_T}
fi
popd
if [[ -n "${CUR_T}" ]]; then