From 732dbbf944fc4cab06946867b0bdb6f71da70d57 Mon Sep 17 00:00:00 2001 From: iliajie Date: Sat, 18 Feb 2023 19:35:13 +0200 Subject: [PATCH] Fix to add CloudLinux detection support --- slib.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/slib.sh b/slib.sh index 709e8dc..d17c0f4 100644 --- a/slib.sh +++ b/slib.sh @@ -540,7 +540,15 @@ get_distro () { os=$(uname -o) # Make sure we're Linux if echo "$os" | grep -iq linux; then - if [ -f /etc/oracle-release ]; then # Oracle + if [ -f /etc/cloudlinux-release ]; then # Oracle + local os_string + os_string=$(cat /etc/cloudlinux-release) + os_real='CloudLinux' + os_pretty=$os_string + os_type='cloudlinux' + os_version=$(echo "$os_string" | grep -o '[0-9\.]*') + os_major_version=$(echo "$os_version" | cut -d '.' -f1) + elif [ -f /etc/oracle-release ]; then # Oracle local os_string os_string=$(cat /etc/oracle-release) os_real='Oracle Linux'