Skip to content

Commit 03af74b

Browse files
committed
el_conf: Add almalinux 10 compat
1 parent 4bb42e8 commit 03af74b

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

el_configurator.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -399,13 +399,16 @@ check_internet
399399
if [ $? -eq 0 ]; then
400400
log "Install available with internet. setting up additional packages."
401401
if [ "${FLAVOR}" = "rhel" ]; then
402-
if [ "${RELEASE}" -eq 10 ]; then
403-
dnf config-manager --set-enabled crb 2>> "${LOG_FILE}" || log "Failed to enable crb" "ERROR"
404-
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm 2>> "${LOG_FILE}" || log "Failed to install epel-release" "ERROR"
402+
# RHEL doesn't have epel-release and needs manual download of the package
403+
if [ "${RELEASE}" -eq 10 ] && [ "${DIST}" == "rhel" ]; then
404+
dnf install -4 -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm 2>> "${LOG_FILE}" || log "Failed to install epel-release" "ERROR"
405405
else
406406
dnf install -4 -y epel-release 2>> "${LOG_FILE}" || log "Failed to install epel-release, some tools like fail2ban will not be installed" "ERROR"
407-
dnf install -4 -y htop atop nmon iftop iptraf tar dnf-automatic 2>> "${LOG_FILE}" || log "Failed to install additional tools" "ERROR"
407+
dnf install -4 -y tar >> "${LOG_FILE}" || log "Cannot install tar" "ERROR"
408+
# The following packages are epel dependant
409+
dnf install -4 -y htop atop nmon iftop iptraf 2>> "${LOG_FILE}" || log "Failed to install additional tools" "ERROR"
408410
fi
411+
dnf config-manager --set-enabled crb 2>> "${LOG_FILE}" || log "Failed to enable crb" "ERROR"
409412
if [ "${CONFIGURE_AUTOMATIC_UPDATES}" != false ]; then
410413
dnf install -4 -y dnf-automatic 2>> "${LOG_FILE}" || log "Failed to install dnf-automatic" "ERROR"
411414
fi

0 commit comments

Comments
 (0)