mirror of https://github.com/CISOfy/lynis.git
OS detection of CoreOS
This commit is contained in:
parent
22d27434c9
commit
fc494a6d3f
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue