mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-27 07:44:14 +02:00
Improve usage of /etc/os-release
This commit is contained in:
parent
fc494a6d3f
commit
ae02e81101
@ -129,11 +129,17 @@
|
|||||||
"CoreOS")
|
"CoreOS")
|
||||||
LINUX_VERSION="CoreOS"
|
LINUX_VERSION="CoreOS"
|
||||||
OS_FULLNAME=$(grep "^PRETTY_NAME=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
|
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_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
|
||||||
OS_NAME="CoreOS Linux"
|
OS_NAME="CoreOS Linux"
|
||||||
;;
|
;;
|
||||||
|
"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 '"')
|
||||||
|
OS_NAME="Ubuntu Linux"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unknown OS found in /etc/os-release. Do you know what it is? Create an issue at ${PROGRAM_SOURCE"
|
Debug "Unknown OS found in /etc/os-release. Do you know what it is? Create an issue at ${PROGRAM_SOURCE}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user