mirror of https://github.com/CISOfy/lynis.git
Use ID from /etc/os-release
This commit is contained in:
parent
ae02e81101
commit
7cc56cf4ea
|
@ -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 '"')
|
||||
|
|
Loading…
Reference in New Issue