Reordered items, added Kali Linux, improved exception message

This commit is contained in:
Michael Boelen 2020-06-19 11:10:22 +02:00
parent 05ef9547ae
commit 6a9e94befb
No known key found for this signature in database
GPG Key ID: 26141F77A09D7F04
1 changed files with 14 additions and 9 deletions

View File

@ -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