Add support for AlmaLinux 8 and 9 (testing)

This commit is contained in:
Jordan Carlin 2024-06-29 12:37:58 -07:00
parent b8adac9beb
commit c47411b4e3
No known key found for this signature in database

View File

@ -50,8 +50,8 @@ source "$os_release"
# Check for compatible distro # Check for compatible distro
if [[ "$ID" = rhel || "$ID_LIKE" = *rhel* ]]; then if [[ "$ID" = rhel || "$ID_LIKE" = *rhel* ]]; then
FAMILY=rhel FAMILY=rhel
if [ "$ID" != rhel ] && [ "$ID" != rocky ]; then if [ "$ID" != rhel ] && [ "$ID" != rocky ] && [ "$ID" != almalinux ]; then
printf "%s\n" "For Red Hat family distros, the Wally install script has only been tested on RHEL and Rocky Linux. Your distro " \ printf "%s\n" "For Red Hat family distros, the Wally install script has only been tested on RHEL, Rocky Linux, and AlmaLinux. Your distro " \
"is $PRETTY_NAME. The regular Red Hat install will be attempted, but there will likely be issues." "is $PRETTY_NAME. The regular Red Hat install will be attempted, but there will likely be issues."
fi fi
if [ "${VERSION_ID:0:1}" = 8 ]; then if [ "${VERSION_ID:0:1}" = 8 ]; then
@ -59,7 +59,7 @@ if [[ "$ID" = rhel || "$ID_LIKE" = *rhel* ]]; then
elif [ "${VERSION_ID:0:1}" = 9 ]; then elif [ "${VERSION_ID:0:1}" = 9 ]; then
RHEL_VERSION=9 RHEL_VERSION=9
else else
echo "The Wally install script is only compatible with versions 8 and 9 of RHEL and Rocky Linux. You have version $VERSION." echo "The Wally install script is only compatible with versions 8 and 9 of RHEL, Rocky Linux, and AlmaLinux. You have version $VERSION."
exit 1 exit 1
fi fi
elif [[ "$ID" = ubuntu || "$ID_LIKE" = *ubuntu* ]]; then elif [[ "$ID" = ubuntu || "$ID_LIKE" = *ubuntu* ]]; then
@ -76,7 +76,7 @@ elif [[ "$ID" = ubuntu || "$ID_LIKE" = *ubuntu* ]]; then
fi fi
else else
printf "%s\n" "The Wally install script is currently only compatible with Ubuntu and Red Hat family " \ printf "%s\n" "The Wally install script is currently only compatible with Ubuntu and Red Hat family " \
"(RHEL or Rocky Linux) distros. Your detected distro is $PRETTY_NAME. You may try manually running the " \ "(RHEL, Rocky Linux, or AlmaLinux) distros. Your detected distro is $PRETTY_NAME. You may try manually running the " \
"commands in this script, but it is likely that some will need to be altered." "commands in this script, but it is likely that some will need to be altered."
exit 1 exit 1
fi fi
@ -107,14 +107,14 @@ echo -e "***********************************************************************
echo -e "Installing Dependencies from Package Manager" echo -e "Installing Dependencies from Package Manager"
echo -e "*************************************************************************" echo -e "*************************************************************************"
echo -e "*************************************************************************\n" echo -e "*************************************************************************\n"
# Installs appropriate packages for rhel or ubuntu distros, picking apt or dnf appropriately # Installs appropriate packages for red hat or ubuntu distros, picking apt or dnf appropriately
if [ "$FAMILY" = rhel ]; then if [ "$FAMILY" = rhel ]; then
# Enable extra package repos # Enable extra package repos
sudo dnf install -y dnf-plugins-core sudo dnf install -y dnf-plugins-core
if [ "$ID" = rhel ]; then if [ "$ID" = rhel ]; then
sudo subscription-manager repos --enable "codeready-builder-for-rhel-$RHEL_VERSION-$(arch)-rpms" sudo subscription-manager repos --enable "codeready-builder-for-rhel-$RHEL_VERSION-$(arch)-rpms"
sudo dnf install -y "https://dl.fedoraproject.org/pub/epel/epel-release-latest-$RHEL_VERSION.noarch.rpm" sudo dnf install -y "https://dl.fedoraproject.org/pub/epel/epel-release-latest-$RHEL_VERSION.noarch.rpm"
else else # RHEL clone
if [ "$RHEL_VERSION" = 8 ]; then if [ "$RHEL_VERSION" = 8 ]; then
sudo dnf config-manager -y --set-enabled powertools sudo dnf config-manager -y --set-enabled powertools
else # Version 9 else # Version 9