introduce AlmaLinux

AlmaLinux is an Open Source fork of Red Hat Enterprise Linux;
it should behave like a CentOS/RHEL.
This commit is contained in:
romain-dartigues 2024-03-17 18:07:29 +01:00
parent 2b102f303a
commit 2e7b332b77
6 changed files with 11 additions and 4 deletions

View File

@ -80,6 +80,12 @@ if [ -f /etc/owl-release ]; then
fi
### Redhat and derivatives
if grep -q ^AlmaLinux /etc/redhat-release 2>/dev/null
then
echo almalinux
exit 0
fi
if grep -q ^Scientific /etc/redhat-release 2>/dev/null; then
echo scientific
exit 0

View File

@ -125,7 +125,7 @@ in
owl)
cat /etc/owl-release
;;
redhat|centos|mitel|scientific)
almalinux|redhat|centos|mitel|scientific)
cat /etc/redhat-release
;;
slackware)

View File

@ -31,7 +31,7 @@ else
# By default determine package manager based on operating system
os="$(cat "$__global/explorer/os")"
case "$os" in
amazon|scientific|centos|fedora|redhat) type="yum" ;;
almalinux|amazon|scientific|centos|fedora|redhat) type="yum" ;;
archlinux) type="pacman" ;;
debian|ubuntu|devuan) type="apt" ;;
freebsd)

View File

@ -37,7 +37,7 @@ fi
state_should="$(cat "$__object/parameter/state")"
if grep -q -E "(scientific|centos|redhat|amazon)" "$__global/explorer/os"; then
if grep -q -E "(almalinux|scientific|centos|redhat|amazon)" "$__global/explorer/os"; then
opts="-y --quiet"
else
opts="--assumeyes --quiet"

View File

@ -22,7 +22,7 @@ os=$(cat "$__global/explorer/os")
state="$(cat "$__object/parameter/state")"
case "$os" in
scientific|centos)
almalinux|scientific|centos)
repo_name="$__object_id"
export repo_name
repo_file="/etc/yum.repos.d/${repo_name}.repo"

View File

@ -3,6 +3,7 @@ Supported operating systems
cdist was tested or is know to run on at least
* `Alma Linux <https://https://almalinux.org>`_
* `Alpine Linux <https://alpinelinux.org>`_
* `Archlinux <http://www.archlinux.org>`_
* `CentOS <http://www.centos.org>`_