From 40e19b62be1b1547612d351f743602c093cec0ea Mon Sep 17 00:00:00 2001 From: Michael Boelen Date: Tue, 8 Nov 2016 19:53:11 +0100 Subject: [PATCH] Added Arch Linux detection via /etc/os-release --- include/osdetection | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/osdetection b/include/osdetection index aaddc1b4..91953591 100644 --- a/include/osdetection +++ b/include/osdetection @@ -129,6 +129,11 @@ OS_ID=$(grep "^ID=" /etc/os-release | awk -F= '{print $2}') if [ ! -z "${OS_ID}" ]; then case ${OS_ID} in + "arch") + LINUX_VERSION="Arch Linux" + OS_FULLNAME="Arch Linux" + OS_VERSION="Unknown" + ;; "coreos") LINUX_VERSION="CoreOS" OS_FULLNAME=$(grep "^PRETTY_NAME=" /etc/os-release | awk -F= '{print $2}' | tr -d '"') @@ -160,7 +165,7 @@ fi # Arch Linux - if [ -e "/etc/arch-release" ]; then + if [ -z "${OS_FULLNAME}" -a -e "/etc/arch-release" ]; then OS_FULLNAME="Arch Linux" OS_VERSION="Unknown" LINUX_VERSION="Arch Linux"