Skip to content

Commit

Permalink
(PE-38404) Install script for AL2
Browse files Browse the repository at this point in the history
  • Loading branch information
amitkarsale committed Jun 11, 2024
1 parent 257c354 commit 849de12
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ case $platform in
;;
"Amzn"|"Amazon Linux")
case $platform_version in
"2") platform_version="7";;
"2") platform_version="2";;
esac
;;
esac
Expand Down Expand Up @@ -789,10 +789,11 @@ install_file() {
fi

rpm -Uvh --oldpackage --replacepkgs "$2"
exists dnf && PKGCMD=dnf || PKGCMD=yum
if test "$version" = 'latest'; then
run_cmd "yum install -y puppet-agent && yum upgrade -y puppet-agent"
run_cmd "${PKGCMD} install -y puppet-agent && ${PKGCMD} upgrade -y puppet-agent"
else
run_cmd "yum install -y 'puppet-agent-${puppet_agent_version}'"
run_cmd "${PKGCMD} install -y 'puppet-agent-${puppet_agent_version}'"
fi
;;
"noarch.rpm")
Expand Down Expand Up @@ -897,7 +898,7 @@ case $platform in
filetype="rpm"
platform_package="el"
# For Amazon Linux 2023 and onwards we can use the 'amazon' packages created instead of 'el' packages
if (( $platform_version >= 2023 )); then
if (( $platform_version == 2023 || $platform_version == 2 )); then
platform_package="amazon"
fi
filename="${collection}-release-${platform_package}-${platform_version}.noarch.rpm"
Expand Down

0 comments on commit 849de12

Please sign in to comment.