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:
parent
22838b714c
commit
4c5f4e8327
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user