Skip to content

Commit

Permalink
Fix powertools installation for RHEL (#259)
Browse files Browse the repository at this point in the history
* fix powertools installation for RHEL

* Fix INSTALLED_FILE typo everywhere and if condition
  • Loading branch information
diodfr authored Jul 15, 2024
1 parent 24f8fc6 commit feeef57
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions slurm/install/rhel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,25 @@
# Licensed under the MIT License.
#
set -e
INSALLED_FILE=/etc/azslurm-bins.installed
if [ -e $INSALLED_FILE ]; then
INSTALLED_FILE=/etc/azslurm-bins.installed
if [ -e $INSTALLED_FILE ]; then
exit 0
fi

SLURM_ROLE=$1
SLURM_VERSION=$2
DISABLE_PMC=$3
OS_VERSION=$(cat /etc/os-release | grep VERSION_ID | cut -d= -f2 | cut -d\" -f2 | cut -d. -f1)
OS_ID=$(cat /etc/os-release | grep ^ID= | cut -d= -f2 | cut -d\" -f2 | cut -d. -f1)

yum -y install epel-release
yum -y install munge jq
if [ "$OS_VERSION" -gt "7" ]; then
dnf -y --enablerepo=powertools install -y perl-Switch
if [ "${OS_ID,,}" == "rhel" ]; then
dnf -y install -y perl-Switch
else
dnf -y --enablerepo=powertools install -y perl-Switch
fi
PACKAGE_DIR=slurm-pkgs-rhel8
else
yum -y install python3
Expand Down Expand Up @@ -57,7 +62,7 @@ if [ "$DISABLE_PMC" == "False" ]; then
yum -y install $pkg-${SLURM_VERSION}.el${OS_VERSION} --disableexcludes slurm
done
fi
touch $INSALLED_FILE
touch $INSTALLED_FILE

exit
fi
Expand All @@ -79,4 +84,4 @@ if [ ${SLURM_ROLE} == "execute" ]; then
done
fi

touch $INSALLED_FILE
touch $INSTALLED_FILE

0 comments on commit feeef57

Please sign in to comment.