Update OS check
This commit is contained in:
parent
2f129f19b3
commit
e79e64174c
@ -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")
|
||||
|
@ -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")
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user