diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2019-08-22 15:20:30 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2019-08-22 15:20:30 +0300 |
commit | d703d160ff7d713f6f922db7a8e8599fb6d1e6c0 (patch) | |
tree | 22eb69e5056efb6fc7633b619e22e913d9351150 /include | |
parent | d2deb63ebb416b957ba973a014ea6588103f3cfc (diff) |
Added RHEL, renamed CentOS Linux name, reordered items
Diffstat (limited to 'include')
-rw-r--r-- | include/osdetection | 24 |
1 files changed, 16 insertions, 8 deletions
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" ;; |