diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2020-06-19 12:10:22 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2020-06-19 12:10:22 +0300 |
commit | 6a9e94befb022530854c4b53496710fe344f7ad0 (patch) | |
tree | 95121046221be76a63a43a4df1be6c0ce02de766 /include/osdetection | |
parent | 05ef9547ae42c9885c84058c575b01ef9ec903cf (diff) |
Reordered items, added Kali Linux, improved exception message
Diffstat (limited to 'include/osdetection')
-rw-r--r-- | include/osdetection | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/include/osdetection b/include/osdetection index 7483664b..88aa8209 100644 --- a/include/osdetection +++ b/include/osdetection @@ -188,11 +188,10 @@ OS_NAME="Gentoo Linux" OS_VERSION="Rolling release" ;; - "pureos") - LINUX_VERSION="PureOS" - 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_NAME="PureOS" + "kali") + LINUX_VERSION="Kali" + OS_NAME="Kali Linux" + OS_VERSION="Rolling release" ;; "manjaro") LINUX_VERSION="Manjaro" @@ -217,11 +216,11 @@ OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"') OS_NAME="openSUSE" ;; - "ubuntu") - LINUX_VERSION="Ubuntu" + "pureos") + LINUX_VERSION="PureOS" 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_NAME="Ubuntu" + OS_NAME="PureOS" ;; "raspbian") LINUX_VERSION="Raspbian" @@ -243,8 +242,14 @@ 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 '"') ;; + "ubuntu") + LINUX_VERSION="Ubuntu" + 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_NAME="Ubuntu" + ;; *) - ReportException "OS Detection" "Unknown OS found in /etc/os-release" + ReportException "OS Detection" "Unknown OS found in /etc/os-release - Please create issue on GitHub project page: ${PROGRAM_SOURCE}" ;; esac fi |