From 6bce9f806465b898ed5245c69816504e3c357b9a Mon Sep 17 00:00:00 2001 From: Dyllan Pascoe Date: Thu, 28 Jan 2021 22:10:49 +0200 Subject: [PATCH 1/2] Added Amazon Linux 2 check to the install.sh script to allow installation on AMI 2.0 --- scripts/install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/install.sh b/scripts/install.sh index d63a5ea5..37521fc1 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -12,7 +12,9 @@ FW_BACKEND="nftables" API_KEY="" check_pkg_manager(){ - if [ -f /etc/redhat-release ] ; then + if [ -f /etc/redhat-release ]; then + PKG="yum" + elif cat /etc/system-release | grep "Amazon Linux release 2 (Karoo)" > /dev/null; then PKG="yum" elif [ -f /etc/debian_version ]; then PKG="apt" From 6b49d344a28000314c27881b32838de841fdcbff Mon Sep 17 00:00:00 2001 From: Dyllan Pascoe Date: Tue, 2 Feb 2021 05:54:23 +0200 Subject: [PATCH 2/2] Using grep -q flag instead of piping to /dev/null --- scripts/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install.sh b/scripts/install.sh index 37521fc1..5aa08014 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -14,7 +14,7 @@ API_KEY="" check_pkg_manager(){ if [ -f /etc/redhat-release ]; then PKG="yum" - elif cat /etc/system-release | grep "Amazon Linux release 2 (Karoo)" > /dev/null; then + elif cat /etc/system-release | grep -q "Amazon Linux release 2 (Karoo)"; then PKG="yum" elif [ -f /etc/debian_version ]; then PKG="apt"