From 7cc56cf4eab4a94fde921ee84e18c3bd6ed796b6 Mon Sep 17 00:00:00 2001 From: Michael Boelen Date: Sun, 16 Oct 2016 11:57:19 +0200 Subject: Use ID from /etc/os-release --- include/osdetection | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/osdetection b/include/osdetection index 4e1dfb5d..6e240ab1 100644 --- a/include/osdetection +++ b/include/osdetection @@ -123,16 +123,16 @@ # Generic if [ -e /etc/os-release ]; then - FIND=$(grep "^NAME=" /etc/os-release) - if [ ! -z "${FIND}" ]; then - case ${FIND} in - "CoreOS") + OS_ID=$(grep "^ID=" /etc/os-release) + if [ ! -z "${OS_ID}" ]; then + case ${OS_ID} in + "coreos") LINUX_VERSION="CoreOS" 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="CoreOS Linux" ;; - "Ubuntu") + "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 '"') -- cgit v1.2.3