From 004527ab3a1f680b7a351b3e1c362234ed719a8f Mon Sep 17 00:00:00 2001 From: ronivay Date: Mon, 3 May 2021 17:15:27 +0300 Subject: [PATCH] Add support for AlmaLinux --- README.md | 1 + xo-install.sh | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7c0398d..7ced29c 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/xo-install.sh b/xo-install.sh index ae8d0a0..170c532 100755 --- a/xo-install.sh +++ b/xo-install.sh @@ -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