From a4f13a8ab2c84627278ca7222713c310d21031ac Mon Sep 17 00:00:00 2001 From: Michael Boelen Date: Tue, 13 Aug 2019 22:09:06 +0200 Subject: [PATCH] Only do Amazon Linux version detection if /etc/os-release does not exist --- include/osdetection | 6 +++--- 1 file 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 } }')