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 e57cf1e70a
commit c13f723f4e
5 changed files with 10 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"