Skip to content

Commit

Permalink
Fix to add CloudLinux detection support
Browse files Browse the repository at this point in the history
  • Loading branch information
iliajie committed Feb 18, 2023
1 parent e328954 commit 732dbbf
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion slib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 732dbbf

Please sign in to comment.