Skip to content

Commit 6dbb7df

Browse files
better amzn linux 2 platform detction
1 parent 3ee26ae commit 6dbb7df

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

install-labkey.bash

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ function step_os_prereqs() {
318318
_amzn)
319319
# amzn stuff goes here
320320
# For versions of Amazon Linux prior to 2023 - Add adoptium repo
321-
if [ "$(platform_version)" != "2023" ]; then
321+
if [ "$(platform_version)" == "2" ]; then
322322
if [ ! -f "/etc/yum.repos.d/adoptium.repo" ]; then
323323
NewFile="/etc/yum.repos.d/adoptium.repo"
324324
(
@@ -702,7 +702,8 @@ function step_postgres_configure() {
702702

703703
case "_$(platform)" in
704704
_amzn)
705-
if [ "$(platform_version)" != "2023" ]; then
705+
# Amazon Linux 2
706+
if [ "$(platform_version)" == "2" ]; then
706707
# Install the Postgresql repository RPM
707708
# note this method is required for AMZN linux and supports PG versions 12-15 - v16 not supported by PG repo
708709
if [[ -z $POSTGRES_VERSION ]]; then
@@ -750,6 +751,7 @@ function step_postgres_configure() {
750751
console_msg "Postgres Client Installed ..."
751752
fi
752753
else
754+
# Amazon Linux 2023
753755
if [ "$(platform_version)" == "2023" ]; then
754756
# AL 2023 supports installing Postgresql 15, 16, or 16 from its repo - however, only one version can be installed
755757
# default to v15 unless another version is supplied

0 commit comments

Comments
 (0)