Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Boelen <michael.boelen@cisofy.com>2016-10-16 12:50:23 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2016-10-16 12:50:23 +0300
commitfc494a6d3fc97311082a8e1d77d062b122f3dd45 (patch)
treebf9842c9ffa6d3ad2e6808c0a2c207d77765ec7f
parent22d27434c9729c9cfe0d9c952ceb5a6e6775499a (diff)
OS detection of CoreOS
-rw-r--r--include/osdetection18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/osdetection b/include/osdetection
index 62a698a0..7710349d 100644
--- a/include/osdetection
+++ b/include/osdetection
@@ -121,6 +121,24 @@
OS_KERNELVERSION=$(echo ${OS_KERNELVERSION_FULL} | sed 's/-.*//')
if [ -e /dev/grsec ]; then GRSEC_FOUND=1; fi
+ # Generic
+ if [ -e /etc/os-release ]; then
+ FIND=$(grep "^NAME=" /etc/os-release)
+ if [ ! -z "${FIND}" ]; then
+ case ${FIND} in
+ "CoreOS")
+ LINUX_VERSION="CoreOS"
+ OS_FULLNAME=$(grep "^PRETTY_NAME=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
+ OS_VERSION=$(grep "^VERSION=" /etc/os-release | awk -F= '{print $2}')
+ OS_NAME="CoreOS Linux"
+ ;;
+ *)
+ echo "Unknown OS found in /etc/os-release. Do you know what it is? Create an issue at ${PROGRAM_SOURCE"
+ ;;
+ esac
+ fi
+ fi
+
# Amazon
if [ -e "/etc/system-release" ]; then
FIND=$(grep "Amazon" /etc/system-release)