Add support for AlmaLinux

This commit is contained in:
ronivay
2021-05-03 17:15:27 +03:00
parent d13badd39e
commit 004527ab3a
2 changed files with 9 additions and 2 deletions

View File

@@ -62,6 +62,7 @@ Script has been tested to work with following distros:
- CentOS 8 (note LVM file level restore issue from below)
- Debian 10
- Ubuntu 20.04
- AlmaLinux 8 (early testing phase)
Installation works but not tested frequently:
- Debian 8

View File

@@ -886,8 +886,8 @@ function CheckOS {
OSVERSION=$(grep ^VERSION_ID /etc/os-release | cut -d'=' -f2 | grep -Eo "[0-9]{1,2}" | head -1)
OSNAME=$(grep ^NAME /etc/os-release | cut -d'=' -f2 | sed 's/"//g' | awk '{print $1}')
if [[ ! $OSNAME =~ ^(Debian|Ubuntu|CentOS)$ ]]; then
printfail "Only Ubuntu/Debian/CentOS supported"
if [[ ! $OSNAME =~ ^(Debian|Ubuntu|CentOS|AlmaLinux)$ ]]; then
printfail "Only Ubuntu/Debian/CentOS/AlmaLinux supported"
exit 1
fi
@@ -896,6 +896,12 @@ function CheckOS {
exit 1
fi
# for future if/when something above 8 is released
if [[ $OSNAME == "AlmaLinux" ]] && [[ $OSVERSION != "8" ]]; then
printfail "Only AlmaLinux 8 supported"
exit 1
fi
if [[ $OSNAME == "Debian" ]] && [[ ! $OSVERSION =~ ^(8|9|10)$ ]]; then
printfail "Only Debian 8/9/10 supported"
exit 1