From e79e64174c3a0a2c7005d45180a67de022c093ca Mon Sep 17 00:00:00 2001 From: hwdsl2 Date: Wed, 14 Jun 2023 23:52:54 -0500 Subject: [PATCH] Update OS check --- extras/quickstart.sh | 2 ++ vpnsetup.sh | 2 ++ vpnsetup_amzn.sh | 6 +++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/extras/quickstart.sh b/extras/quickstart.sh index 5f5b1b8..b3f1e1a 100755 --- a/extras/quickstart.sh +++ b/extras/quickstart.sh @@ -93,6 +93,8 @@ check_os() { elif grep -qs "Amazon Linux release 2 " /etc/system-release; then os_type=amzn os_ver=2 + elif grep -qs "Amazon Linux release 2023" /etc/system-release; then + exiterr "Amazon Linux 2023 is not supported." else os_type=$(lsb_release -si 2>/dev/null) [ -z "$os_type" ] && [ -f /etc/os-release ] && os_type=$(. /etc/os-release && printf '%s' "$ID") diff --git a/vpnsetup.sh b/vpnsetup.sh index 5f5b1b8..b3f1e1a 100755 --- a/vpnsetup.sh +++ b/vpnsetup.sh @@ -93,6 +93,8 @@ check_os() { elif grep -qs "Amazon Linux release 2 " /etc/system-release; then os_type=amzn os_ver=2 + elif grep -qs "Amazon Linux release 2023" /etc/system-release; then + exiterr "Amazon Linux 2023 is not supported." else os_type=$(lsb_release -si 2>/dev/null) [ -z "$os_type" ] && [ -f /etc/os-release ] && os_type=$(. /etc/os-release && printf '%s' "$ID") diff --git a/vpnsetup_amzn.sh b/vpnsetup_amzn.sh index 5e602da..3879329 100755 --- a/vpnsetup_amzn.sh +++ b/vpnsetup_amzn.sh @@ -54,7 +54,11 @@ check_root() { check_os() { if ! grep -qs "Amazon Linux release 2 " /etc/system-release; then - exiterr "This script only supports Amazon Linux 2." + if grep -qs "Amazon Linux release 2023" /etc/system-release; then + exiterr "Amazon Linux 2023 is not supported." + else + exiterr "This script only supports Amazon Linux 2." + fi fi }