mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-26 23:34: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
|
fi
|
||||||
|
|
||||||
# Amazon
|
# Amazon
|
||||||
if [ -e "/etc/system-release" ]; then
|
if [ -z "${LINUX_VERSION}" -a -e "/etc/system-release" ]; then
|
||||||
FIND=$(grep "Amazon" /etc/system-release)
|
FIND=$(grep "^Amazon" /etc/system-release)
|
||||||
if [ ! "${FIND}" = "" ]; then
|
if [ -n "${FIND}" ]; then
|
||||||
OS_REDHAT_OR_CLONE=1
|
OS_REDHAT_OR_CLONE=1
|
||||||
OS_FULLNAME=$(grep "^Amazon" /etc/system-release)
|
OS_FULLNAME=$(grep "^Amazon" /etc/system-release)
|
||||||
OS_VERSION=$(grep "^Amazon" /etc/system-release | awk '{ if ($4=="release") { print $5 } }')
|
OS_VERSION=$(grep "^Amazon" /etc/system-release | awk '{ if ($4=="release") { print $5 } }')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user