more types for AlmaLinux
Untested yet.
This commit is contained in:
parent
2e7b332b77
commit
4b874656a9
30 changed files with 52 additions and 33 deletions
|
@ -24,7 +24,7 @@
|
|||
os=$(cat "$__global/explorer/os")
|
||||
|
||||
case "$os" in
|
||||
alpine|scientific|centos|redhat|ubuntu|debian|devuan|archlinux|gentoo)
|
||||
almalinux|alpine|scientific|centos|redhat|ubuntu|debian|devuan|archlinux|gentoo)
|
||||
# any linux should work
|
||||
:
|
||||
;;
|
||||
|
|
|
@ -136,7 +136,7 @@ init_upstart()
|
|||
|
||||
manual_setup () {
|
||||
case "$os" in
|
||||
alpine|scientific|centos|debian|devuan|redhat|ubuntu)
|
||||
almalinux|alpine|scientific|centos|debian|devuan|redhat|ubuntu)
|
||||
# whitelist safeguard
|
||||
:
|
||||
;;
|
||||
|
@ -174,9 +174,14 @@ manual_setup () {
|
|||
devuan)
|
||||
init_sysvinit debian
|
||||
;;
|
||||
centos|redhat)
|
||||
almalinux|centos|redhat)
|
||||
os_version="$(sed 's/[^0-9.]//g' "$__global/explorer/os_version")"
|
||||
major_version="${os_version%%.*}"
|
||||
if [ "$os" = almalinux ]
|
||||
then
|
||||
init_systemd
|
||||
return
|
||||
fi
|
||||
case "$major_version" in
|
||||
[456])
|
||||
init_sysvinit redhat
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
os=$(cat "$__global/explorer/os")
|
||||
|
||||
case "$os" in
|
||||
scientific|centos|redhat)
|
||||
almalinux|scientific|centos|redhat)
|
||||
# whitelist safeguard
|
||||
service_onchange='service consul-template status >/dev/null && service consul-template reload || true' \
|
||||
;;
|
||||
|
@ -151,7 +151,7 @@ require="__directory${conf_dir}" \
|
|||
# Install init script to start on boot
|
||||
service="consul-template"
|
||||
case "$os" in
|
||||
centos|redhat)
|
||||
almalinux|centos|redhat)
|
||||
os_version="$(sed 's/[^0-9.]//g' "$__global/explorer/os_version")"
|
||||
major_version="${os_version%%.*}"
|
||||
case "$major_version" in
|
||||
|
|
|
@ -27,7 +27,7 @@ else
|
|||
fi
|
||||
|
||||
case "$os" in
|
||||
alpine|centos|fedora|gentoo|redhat|suse|ubuntu)
|
||||
almalinux|alpine|centos|fedora|gentoo|redhat|suse|ubuntu)
|
||||
if [ ! -x "$(command -v lsblk)" ]; then
|
||||
echo "lsblk is required for __filesystem type" >&2
|
||||
exit 1
|
||||
|
|
|
@ -64,7 +64,7 @@ else
|
|||
echo service \"$name\" \"$cmd\"
|
||||
;;
|
||||
|
||||
amazon|scientific|centos|fedora|owl|redhat|suse)
|
||||
almalinux|amazon|scientific|centos|fedora|owl|redhat|suse)
|
||||
echo service \"$name\" \"$cmd\"
|
||||
;;
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ else
|
|||
case ${os}
|
||||
in
|
||||
# RedHat-derivatives and BSDs
|
||||
(centos|fedora|redhat|scientific|freebsd|macosx|netbsd|openbsd)
|
||||
(almalinux|centos|fedora|redhat|scientific|freebsd|macosx|netbsd|openbsd)
|
||||
# Hostname is FQDN
|
||||
name_should=${__target_host:?}
|
||||
;;
|
||||
|
@ -67,7 +67,7 @@ in
|
|||
"&& hostnamectl set-hostname '${name_should}'" \
|
||||
"|| hostname '${name_should}'"
|
||||
;;
|
||||
(centos|fedora|redhat|scientific|freebsd|netbsd|openbsd|gentoo|void)
|
||||
(almalinux|centos|fedora|redhat|scientific|freebsd|netbsd|openbsd|gentoo|void)
|
||||
echo "hostname '${name_should}'"
|
||||
;;
|
||||
(openwrt)
|
||||
|
|
|
@ -36,7 +36,7 @@ else
|
|||
case ${os}
|
||||
in
|
||||
# RedHat-derivatives and BSDs
|
||||
(centos|fedora|redhat|scientific|freebsd|netbsd|openbsd|slackware|suse)
|
||||
(almalinux|centos|fedora|redhat|scientific|freebsd|netbsd|openbsd|slackware|suse)
|
||||
# Hostname is FQDN
|
||||
name_should=${__target_host:?}
|
||||
;;
|
||||
|
@ -77,7 +77,7 @@ in
|
|||
# --value "\"$name_should\""
|
||||
fi
|
||||
;;
|
||||
(centos|fedora|redhat|scientific)
|
||||
(almalinux|centos|fedora|redhat|scientific)
|
||||
if test -z "${has_hostnamectl}"
|
||||
then
|
||||
# Only write to /etc/sysconfig/network on non-systemd versions.
|
||||
|
|
|
@ -62,7 +62,7 @@ in
|
|||
unset CDIST_ORDER_DEPENDENCY
|
||||
fi
|
||||
;;
|
||||
(centos|fedora|redhat|scientific)
|
||||
(almalinux|centos|fedora|redhat|scientific)
|
||||
os_version=$(cat "${__global:?}/explorer/os_version")
|
||||
os_major=$(expr "${os_version}" : '.* release \([0-9]*\)')
|
||||
case ${os}
|
||||
|
@ -73,13 +73,13 @@ in
|
|||
(fedora)
|
||||
update_sysconfig=$(test "${os_major}" -lt 10 && echo true || echo false)
|
||||
;;
|
||||
(redhat|*)
|
||||
(almalinux|redhat|*)
|
||||
case ${os_version}
|
||||
in
|
||||
('Red Hat Enterprise Linux'*)
|
||||
update_sysconfig=$(test "${os_major}" -lt 6 && echo true || echo false)
|
||||
;;
|
||||
('Red Hat Linux'*)
|
||||
('Red Hat Linux'*|'AlmaLinux'*)
|
||||
update_sysconfig=true
|
||||
;;
|
||||
(*)
|
||||
|
|
|
@ -70,6 +70,11 @@ if [ -f "$chroot/etc/owl-release" ]; then
|
|||
fi
|
||||
|
||||
### Redhat and derivatives
|
||||
if grep -q ^AlmaLinux "$chroot/etc/redhat-release" 2>/dev/null; then
|
||||
echo almalinux
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if grep -q ^CentOS "$chroot/etc/redhat-release" 2>/dev/null; then
|
||||
echo centos
|
||||
exit 0
|
||||
|
|
|
@ -30,7 +30,7 @@ case "$os" in
|
|||
# Debian needs a seperate package
|
||||
__package locales --state present
|
||||
;;
|
||||
archlinux|suse|ubuntu|scientific|centos|alpine)
|
||||
almalinux|archlinux|suse|ubuntu|scientific|centos|alpine)
|
||||
:
|
||||
;;
|
||||
*)
|
||||
|
|
|
@ -79,7 +79,7 @@ in
|
|||
archlinux)
|
||||
locale_conf="/etc/locale.conf"
|
||||
;;
|
||||
centos|redhat|scientific)
|
||||
almalinux|centos|redhat|scientific)
|
||||
# shellcheck source=/dev/null
|
||||
version_id=$(. "${__global}/explorer/os_release" && echo "${VERSION_ID:-0}")
|
||||
if echo "${version_id}" | version_ge 7
|
||||
|
|
|
@ -61,7 +61,7 @@ in
|
|||
printf '%s does not support locales.\n' "${os}" >&2
|
||||
exit 1
|
||||
;;
|
||||
(archlinux|debian|devuan|ubuntu|suse|centos|fedora|redhat|scientific)
|
||||
(almalinux|archlinux|debian|devuan|ubuntu|suse|centos|fedora|redhat|scientific)
|
||||
# FIXME: The code below only works for glibc-based installations.
|
||||
|
||||
# NOTE: Hardcoded, create a pull request in case it is at another
|
||||
|
|
|
@ -23,7 +23,7 @@ else
|
|||
# By default determine package manager based on operating system
|
||||
os="$("$__explorer/os")"
|
||||
case "$os" in
|
||||
amazon|scientific|centos|fedora|redhat) echo "yum" ;;
|
||||
almalinux|amazon|scientific|centos|fedora|redhat) echo "yum" ;;
|
||||
debian|ubuntu|devuan) echo "apt" ;;
|
||||
archlinux) echo "pacman" ;;
|
||||
alpine) echo "apk" ;;
|
||||
|
|
|
@ -38,7 +38,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" ;;
|
||||
debian|ubuntu|devuan) type="apt" ;;
|
||||
archlinux) type="pacman" ;;
|
||||
*)
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
os=$(cat "$__global/explorer/os")
|
||||
|
||||
case "$os" in
|
||||
ubuntu|debian|archlinux|scientific|centos|devuan)
|
||||
almalinux|ubuntu|debian|archlinux|scientific|centos|devuan)
|
||||
:
|
||||
;;
|
||||
*)
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
os=$("$__explorer/os")
|
||||
|
||||
case "$os" in
|
||||
alpine|ubuntu|debian|archlinux|suse|scientific|centos|devuan)
|
||||
almalinux|alpine|ubuntu|debian|archlinux|suse|scientific|centos|devuan)
|
||||
:
|
||||
;;
|
||||
*)
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
os=$(cat "$__global/explorer/os")
|
||||
|
||||
case "$os" in
|
||||
alpine|archlinux|centos|debian|devuan|suse|scientific|ubuntu)
|
||||
almalinux|alpine|archlinux|centos|debian|devuan|suse|scientific|ubuntu)
|
||||
:
|
||||
;;
|
||||
*)
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
os=$(cat "$__global/explorer/os")
|
||||
|
||||
case "$os" in
|
||||
ubuntu|debian|archlinux|scientific|centos|devuan)
|
||||
almalinux|ubuntu|debian|archlinux|scientific|centos|devuan)
|
||||
echo "postfix reload"
|
||||
;;
|
||||
*)
|
||||
|
|
|
@ -26,7 +26,7 @@ in
|
|||
(alpine)
|
||||
echo 'postgres'
|
||||
;;
|
||||
(centos|rhel|scientific)
|
||||
(almalinux|centos|rhel|scientific)
|
||||
echo 'postgres'
|
||||
;;
|
||||
(debian|devuan|ubuntu)
|
||||
|
|
|
@ -67,7 +67,7 @@ in
|
|||
(echo "${os_version}" | version_ge 10.04) || package_name='debianutils'
|
||||
pkg_type='apt'
|
||||
;;
|
||||
centos|fedora|redhat|scientific)
|
||||
almalinux|centos|fedora|redhat|scientific)
|
||||
pkg_type='yum'
|
||||
;;
|
||||
*)
|
||||
|
|
|
@ -24,7 +24,7 @@ state_should=$(cat "${__object:?}/parameter/state")
|
|||
|
||||
case ${os}
|
||||
in
|
||||
(alpine|centos|fedora|redhat|scientific|debian|devuan|ubuntu)
|
||||
(almalinux|alpine|centos|fedora|redhat|scientific|debian|devuan|ubuntu)
|
||||
if test "${state_should}" != 'absent'
|
||||
then
|
||||
__package openssh-server --state present
|
||||
|
|
|
@ -62,7 +62,7 @@ else
|
|||
[ -f "/etc/init/${name}.conf" ] && state="present"
|
||||
;;
|
||||
|
||||
amazon|scientific|centos|fedora|owl|redhat)
|
||||
almalinux|amazon|scientific|centos|fedora|owl|redhat)
|
||||
state=$(chkconfig --level "$runlevel" "$name" || echo absent)
|
||||
[ "$state" ] || state="present"
|
||||
;;
|
||||
|
|
|
@ -30,7 +30,7 @@ fi
|
|||
os=$(cat "$__global/explorer/os")
|
||||
case "$os" in
|
||||
# Linux
|
||||
redhat|centos|ubuntu|debian|devuan|archlinux|gentoo|coreos)
|
||||
almalinux|redhat|centos|ubuntu|debian|devuan|archlinux|gentoo|coreos)
|
||||
flag='-w'
|
||||
;;
|
||||
# BusyBox
|
||||
|
|
|
@ -25,7 +25,7 @@ os=$(cat "$__global/explorer/os")
|
|||
|
||||
case "$os" in
|
||||
# Linux
|
||||
alpine|redhat|centos|ubuntu|debian|devuan|archlinux|coreos)
|
||||
almalinux|alpine|redhat|centos|ubuntu|debian|devuan|archlinux|coreos)
|
||||
:
|
||||
;;
|
||||
# BSD
|
||||
|
|
|
@ -42,7 +42,7 @@ case "$os" in
|
|||
# whitelist
|
||||
:
|
||||
;;
|
||||
scientific|centos)
|
||||
almalinux|scientific|centos)
|
||||
__package tzdata --state present
|
||||
export require="__package/tzdata"
|
||||
__file /etc/sysconfig/clock \
|
||||
|
|
|
@ -25,6 +25,10 @@ case "$state" in
|
|||
os="$(cat "$__global/explorer/os")"
|
||||
|
||||
case "$os" in
|
||||
almalinux)
|
||||
__package epel-release
|
||||
require='__package/epel-release' __package ufw
|
||||
;;
|
||||
centos)
|
||||
# shellcheck source=/dev/null
|
||||
if (. "$__global/explorer/os_release" && [ "${VERSION_ID}" = "7" ]); then
|
||||
|
|
|
@ -33,7 +33,7 @@ case "$src" in
|
|||
;;
|
||||
*.7z)
|
||||
case "$os" in
|
||||
centos|fedora|redhat)
|
||||
almalinux|centos|fedora|redhat)
|
||||
cmd='7za'
|
||||
;;
|
||||
*)
|
||||
|
|
|
@ -23,7 +23,7 @@ case "$src" in
|
|||
debian|ubuntu|devuan)
|
||||
__package xz-utils
|
||||
;;
|
||||
alpine|centos)
|
||||
almalinux|alpine|centos)
|
||||
__package xz
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -77,6 +77,11 @@ 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
|
||||
|
|
|
@ -54,7 +54,7 @@ case "$($__explorer/os)" in
|
|||
owl)
|
||||
cat /etc/owl-release
|
||||
;;
|
||||
redhat|centos|mitel|scientific)
|
||||
almalinux|redhat|centos|mitel|scientific)
|
||||
cat /etc/redhat-release
|
||||
;;
|
||||
slackware)
|
||||
|
|
Loading…
Reference in a new issue