Skip to content

Commit

Permalink
chore: turn off ubuntu pro for non fips/1804 (#4221)
Browse files Browse the repository at this point in the history
Co-authored-by: anujmaheshwari1 <[email protected]>
  • Loading branch information
anujmaheshwari1 and anujmaheshwari1 authored Apr 2, 2024
1 parent 10f1488 commit c40c5c5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
9 changes: 6 additions & 3 deletions vhdbuilder/packer/post-install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,12 @@ if [[ $OS == $UBUNTU_OS_NAME ]]; then
retrycmd_if_failure 10 2 60 apt-get -y autoremove --purge || exit 1
retrycmd_if_failure 10 2 60 apt-get -y clean || exit 1

# Final step: log UA status, detach UA, and clean up
ua status
detachAndCleanUpUA
# Final step, if 18.04 or FIPS, log ua status, detach UA and clean up
if [[ "${UBUNTU_RELEASE}" == "18.04" ]] || [[ "${ENABLE_FIPS,,}" == "true" ]]; then
# 'ua status' for logging
ua status
detachAndCleanUpUA
fi
fi
stop_watch $capture_time "Log / Detach UA and Clean-up" false
start_watch
Expand Down
6 changes: 4 additions & 2 deletions vhdbuilder/packer/pre-install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,10 @@ if [[ ${OS} == ${MARINER_OS_NAME} ]]; then
installFIPS
fi
else
# Enable ESM on Ubuntu
autoAttachUA
# Enable ESM for 18.04 and FIPS only
if [[ "${UBUNTU_RELEASE}" == "18.04" ]] || [[ "${ENABLE_FIPS,,}" == "true" ]]; then
autoAttachUA
fi

# Run apt get update to refresh repo list
# Run apt dist get upgrade to install packages/kernels
Expand Down

0 comments on commit c40c5c5

Please sign in to comment.