From d703d160ff7d713f6f922db7a8e8599fb6d1e6c0 Mon Sep 17 00:00:00 2001 From: Michael Boelen Date: Thu, 22 Aug 2019 14:20:30 +0200 Subject: Added RHEL, renamed CentOS Linux name, reordered items --- include/osdetection | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'include/osdetection') diff --git a/include/osdetection b/include/osdetection index de8ebdd5..e1f55350 100644 --- a/include/osdetection +++ b/include/osdetection @@ -154,7 +154,7 @@ OS_VERSION="Rolling release" ;; "centos") - LINUX_VERSION="CentOS Linux" + LINUX_VERSION="CentOS" OS_FULLNAME=$(grep "^PRETTY_NAME=" /etc/os-release | awk -F= '{print $2}' | tr -d '"') OS_NAME="CentOS Linux" OS_REDHAT_OR_CLONE=1 @@ -174,16 +174,10 @@ OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"') ;; "manjaro") - LINUX_VERSION="Manjaro Linux" + LINUX_VERSION="Manjaro" OS_FULLNAME="Manjaro Linux" OS_VERSION="Rolling release" ;; - "ubuntu") - LINUX_VERSION="Ubuntu" - OS_FULLNAME=$(grep "^PRETTY_NAME=" /etc/os-release | awk -F= '{print $2}' | tr -d '"') - OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"') - OS_NAME="Ubuntu Linux" - ;; "opensuse-tumbleweed") LINUX_VERSION="openSUSE Tumbleweed" OS_FULLNAME=$(grep "^PRETTY_NAME=" /etc/os-release | awk -F= '{print $2}' | tr -d '"') @@ -197,6 +191,20 @@ OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"') OS_NAME="openSUSE" ;; + "ubuntu") + LINUX_VERSION="Ubuntu" + OS_FULLNAME=$(grep "^PRETTY_NAME=" /etc/os-release | awk -F= '{print $2}' | tr -d '"') + OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"') + OS_NAME="Ubuntu Linux" + ;; + "rhel") + LINUX_VERSION="RHEL" + OS_NAME=$(grep "^PRETTY_NAME=" /etc/os-release | awk -F= '{print $2}' | tr -d '"') + OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"') + OS_VERSION_FULL=$(grep "^VERSION=" /etc/os-release | awk -F= '{print $2}' | tr -d '"') + OS_FULLNAME="${OS_NAME} ${OS_VERSION_FULL}" + OS_REDHAT_OR_CLONE=1 + ;; *) ReportException "OS Detection" "Unknown OS found in /etc/os-release" ;; -- cgit v1.2.3