diskimage-builder/diskimage_builder/elements/elrepo/pre-install.d/01-elrepo
Birger J. Nordølum ce44d51677
feat: add almalinux-container element
Change-Id: I0b9f50e9a8844e157af70ee0f343fe9d40fa2537
Signed-off-by: Birger J. Nordølum <contact@mindtooth.no>
2024-03-07 08:31:42 +01:00

24 lines
475 B
Bash
Executable File

#!/bin/bash
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
case "$DISTRO_NAME" in
almalinux* | centos* | rhel* | rocky*)
dnf install -y elrepo-release.noarch
if [ ${DIB_ELREPO_KERNEL:-0} -eq 1 ]; then
rpm -q dnf-plugins-core || dnf install -y dnf-plugins-core
dnf config-manager --set-enabled "elrepo-kernel"
fi
;;
*)
echo "Distro \"$DISTRO_NAME\" is not supported"
exit 1
;;
esac
exit 0