diff --git a/parts/linux/cloud-init/artifacts/cse_install.sh b/parts/linux/cloud-init/artifacts/cse_install.sh index 8f0bdb2c6ec..271e4734160 100755 --- a/parts/linux/cloud-init/artifacts/cse_install.sh +++ b/parts/linux/cloud-init/artifacts/cse_install.sh @@ -385,14 +385,15 @@ downloadCrictl() { } installCrictl() { + local crictlVersion=${1} CPU_ARCH=$(getCPUArch) currentVersion=$(crictl --version 2>/dev/null | sed 's/crictl version //g') if [[ "${currentVersion}" != "" ]]; then - echo "version ${currentVersion} of crictl already installed. skipping installCrictl of target version ${1%.*}.0" + echo "version ${currentVersion} of crictl already installed. skipping installCrictl of target version ${crictlVersion%.*}.0" else # this is only called during cse. VHDs should have crictl binaries pre-cached so no need to download. # if the vhd does not have crictl pre-baked, return early - CRICTL_TGZ_TEMP="crictl-v${CRICTL_VERSION}-linux-${CPU_ARCH}.tar.gz" + CRICTL_TGZ_TEMP="crictl-v${crictlVersion}-linux-${CPU_ARCH}.tar.gz" if [[ ! -f "$CRICTL_DOWNLOAD_DIR/${CRICTL_TGZ_TEMP}" ]]; then rm -rf ${CRICTL_DOWNLOAD_DIR} echo "pre-cached crictl not found: skipping installCrictl" diff --git a/vhdbuilder/packer/install-dependencies.sh b/vhdbuilder/packer/install-dependencies.sh index 062bdf590e6..fa0cb6613c0 100644 --- a/vhdbuilder/packer/install-dependencies.sh +++ b/vhdbuilder/packer/install-dependencies.sh @@ -228,10 +228,6 @@ while IFS= read -r p; do downloadCrictl "${downloadDir}" "${evaluatedURL}" installCrictl "${version}" echo " - crictl version ${version}" >> ${VHD_LOGS_FILEPATH} - # other steps are dependent on CRICTL_VERSION and CRICTL_VERSIONS - # since we only have 1 entry in CRICTL_VERSIONS, we simply set both to the same value - CRICTL_VERSION=${version} - CRICTL_VERSIONS=${version} done ;; "azure-cni")