diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2019-08-13 23:09:06 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2019-08-13 23:09:06 +0300 |
commit | a4f13a8ab2c84627278ca7222713c310d21031ac (patch) | |
tree | 2b78cd0aede022107167f4f66737e8f765a20dd3 /include/osdetection | |
parent | e5b8047133a2f5107f4096c265ff075083e31776 (diff) |
Only do Amazon Linux version detection if /etc/os-release does not exist
Diffstat (limited to 'include/osdetection')
-rw-r--r-- | include/osdetection | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/osdetection b/include/osdetection index 164a4597..e7a14a3a 100644 --- a/include/osdetection +++ b/include/osdetection @@ -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 } }') |