1
0
mirror of https://github.com/CISOfy/lynis.git synced 2025-04-08 17:15:25 +02:00

Only do Amazon Linux version detection if /etc/os-release does not exist

This commit is contained in:
Michael Boelen 2019-08-13 22:09:06 +02:00
parent e5b8047133
commit a4f13a8ab2
No known key found for this signature in database
GPG Key ID: 26141F77A09D7F04

@ -195,9 +195,9 @@
fi
# Amazon
if [ -e "/etc/system-release" ]; then
FIND=$(grep "Amazon" /etc/system-release)
if [ ! "${FIND}" = "" ]; then
if [ -z "${LINUX_VERSION}" -a -e "/etc/system-release" ]; then
FIND=$(grep "^Amazon" /etc/system-release)
if [ -n "${FIND}" ]; then
OS_REDHAT_OR_CLONE=1
OS_FULLNAME=$(grep "^Amazon" /etc/system-release)
OS_VERSION=$(grep "^Amazon" /etc/system-release | awk '{ if ($4=="release") { print $5 } }')