1
0
mirror of synced 2024-11-21 20:46:10 +03:00

Update OS check

- Update OS check to detect Amazon Linux 2023, which is not currently
  supported for use with this project.
  Ref: #1388
This commit is contained in:
hwdsl2 2023-05-21 22:19:30 -05:00
parent 22838b714c
commit 4c5f4e8327
7 changed files with 7 additions and 7 deletions

View File

@ -66,7 +66,7 @@ check_os() {
else
exiterr "This script only supports CentOS/RHEL 7-9."
fi
elif grep -qs "Amazon Linux release 2" /etc/system-release; then
elif grep -qs "Amazon Linux release 2 " /etc/system-release; then
os_type=amzn
os_ver=2
else

View File

@ -90,7 +90,7 @@ check_os() {
else
exiterr "This script only supports CentOS/RHEL 7-9."
fi
elif grep -qs "Amazon Linux release 2" /etc/system-release; then
elif grep -qs "Amazon Linux release 2 " /etc/system-release; then
os_type=amzn
os_ver=2
else

View File

@ -46,7 +46,7 @@ check_os() {
if ! grep -q -E "release (7|8|9)" "$rh_file"; then
exiterr "This script only supports CentOS/RHEL 7-9."
fi
elif grep -qs "Amazon Linux release 2" /etc/system-release; then
elif grep -qs "Amazon Linux release 2 " /etc/system-release; then
os_type=amzn
else
os_type=$(lsb_release -si 2>/dev/null)

View File

@ -60,7 +60,7 @@ check_os() {
else
exiterr "This script only supports CentOS/RHEL 7-9."
fi
elif grep -qs "Amazon Linux release 2" /etc/system-release; then
elif grep -qs "Amazon Linux release 2 " /etc/system-release; then
os_type=amzn
os_ver=2
else

View File

@ -34,7 +34,7 @@ check_root() {
}
check_os() {
if ! grep -qs "Amazon Linux release 2" /etc/system-release; then
if ! grep -qs "Amazon Linux release 2 " /etc/system-release; then
exiterr "This script only supports Amazon Linux 2."
fi
}

View File

@ -90,7 +90,7 @@ check_os() {
else
exiterr "This script only supports CentOS/RHEL 7-9."
fi
elif grep -qs "Amazon Linux release 2" /etc/system-release; then
elif grep -qs "Amazon Linux release 2 " /etc/system-release; then
os_type=amzn
os_ver=2
else

View File

@ -53,7 +53,7 @@ check_root() {
}
check_os() {
if ! grep -qs "Amazon Linux release 2" /etc/system-release; then
if ! grep -qs "Amazon Linux release 2 " /etc/system-release; then
exiterr "This script only supports Amazon Linux 2."
fi
}