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:
parent
e5b8047133
commit
a4f13a8ab2
@ -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 } }')
|
||||
|
Loading…
x
Reference in New Issue
Block a user