1
0
mirror of synced 2024-11-24 05:46:09 +03:00

Compare commits

...

2 Commits

Author SHA1 Message Date
hwdsl2
8973b8d6c0 Update tests 2022-08-09 19:35:32 -05:00
hwdsl2
1dbf897500 Cleanup
- Fix OS checking: Don't show errors for /etc/redhat-release.
- Fixes #1211.
2022-08-09 19:34:32 -05:00
9 changed files with 22 additions and 22 deletions

View File

@ -86,8 +86,8 @@ jobs:
yum -y -q update
yum -y -q install wget rsyslog
if grep -qs 'release 9' /etc/redhat-release; then
if grep -qi rocky /etc/redhat-release \
|| grep -qi alma /etc/redhat-release; then
if grep -qs -i rocky /etc/redhat-release \
|| grep -qs -i alma /etc/redhat-release; then
yum -y -q install diffutils
fi
fi
@ -144,13 +144,13 @@ jobs:
y
ANSWERS
rm -f /etc/ipsec.d/vpnclient*
if grep -qi stream /etc/redhat-release \
if grep -qs -i stream /etc/redhat-release \
|| grep -qs -E 'release (8|9)' /etc/oracle-release; then
mkdir /etc/xl2tpd
fi
if grep -qs 'release 9' /etc/redhat-release; then
if grep -qi rocky /etc/redhat-release \
|| grep -qi alma /etc/redhat-release; then
if grep -qs -i rocky /etc/redhat-release \
|| grep -qs -i alma /etc/redhat-release; then
mkdir /etc/xl2tpd
fi
fi

View File

@ -44,8 +44,8 @@ check_os() {
[ -f /etc/oracle-release ] && os_type=ol
if grep -qs "release 7" "$rh_file" || grep -qs "release 8" "$rh_file" \
|| grep -qs "release 9" "$rh_file"; then
grep -qi rocky "$rh_file" && os_type=rocky
grep -qi alma "$rh_file" && os_type=alma
grep -qs -i rocky "$rh_file" && os_type=rocky
grep -qs -i alma "$rh_file" && os_type=alma
elif grep -qs "Amazon Linux release 2" /etc/system-release; then
os_type=amzn
else

View File

@ -53,8 +53,8 @@ check_os() {
os_type=rhel
fi
[ -f /etc/oracle-release ] && os_type=ol
grep -qi rocky "$rh_file" && os_type=rocky
grep -qi alma "$rh_file" && os_type=alma
grep -qs -i rocky "$rh_file" && os_type=rocky
grep -qs -i alma "$rh_file" && os_type=alma
if grep -qs "release 7" "$rh_file"; then
os_ver=7
elif grep -qs "release 8" "$rh_file"; then
@ -154,7 +154,7 @@ confirm_or_abort() {
show_header() {
cat <<'EOF'
IKEv2 Script Copyright (c) 2020-2022 Lin Song 31 Jul 2022
IKEv2 Script Copyright (c) 2020-2022 Lin Song 9 Aug 2022
EOF
}

View File

@ -75,8 +75,8 @@ check_os() {
os_type=rhel
fi
[ -f /etc/oracle-release ] && os_type=ol
grep -qi rocky "$rh_file" && os_type=rocky
grep -qi alma "$rh_file" && os_type=alma
grep -qs -i rocky "$rh_file" && os_type=rocky
grep -qs -i alma "$rh_file" && os_type=alma
if grep -qs "release 7" "$rh_file"; then
os_ver=7
elif grep -qs "release 8" "$rh_file"; then

View File

@ -42,8 +42,8 @@ check_os() {
[ -f /etc/oracle-release ] && os_type=ol
if grep -qs "release 7" "$rh_file" || grep -qs "release 8" "$rh_file" \
|| grep -qs "release 9" "$rh_file"; then
grep -qi rocky "$rh_file" && os_type=rocky
grep -qi alma "$rh_file" && os_type=alma
grep -qs -i rocky "$rh_file" && os_type=rocky
grep -qs -i alma "$rh_file" && os_type=alma
elif grep -qs "Amazon Linux release 2" /etc/system-release; then
os_type=amzn
else

View File

@ -43,8 +43,8 @@ check_os() {
os_type=rhel
fi
[ -f /etc/oracle-release ] && os_type=ol
grep -qi rocky "$rh_file" && os_type=rocky
grep -qi alma "$rh_file" && os_type=alma
grep -qs -i rocky "$rh_file" && os_type=rocky
grep -qs -i alma "$rh_file" && os_type=alma
if grep -qs "release 7" "$rh_file"; then
os_ver=7
elif grep -qs "release 8" "$rh_file"; then

View File

@ -46,8 +46,8 @@ check_os() {
os_type=rhel
fi
[ -f /etc/oracle-release ] && os_type=ol
grep -qi rocky "$rh_file" && os_type=rocky
grep -qi alma "$rh_file" && os_type=alma
grep -qs -i rocky "$rh_file" && os_type=rocky
grep -qs -i alma "$rh_file" && os_type=alma
if grep -qs "release 7" "$rh_file"; then
os_ver=7
elif grep -qs "release 8" "$rh_file"; then

View File

@ -75,8 +75,8 @@ check_os() {
os_type=rhel
fi
[ -f /etc/oracle-release ] && os_type=ol
grep -qi rocky "$rh_file" && os_type=rocky
grep -qi alma "$rh_file" && os_type=alma
grep -qs -i rocky "$rh_file" && os_type=rocky
grep -qs -i alma "$rh_file" && os_type=alma
if grep -qs "release 7" "$rh_file"; then
os_ver=7
elif grep -qs "release 8" "$rh_file"; then

View File

@ -80,8 +80,8 @@ check_os() {
os_type=rhel
fi
[ -f /etc/oracle-release ] && os_type=ol
grep -qi rocky "$rh_file" && os_type=rocky
grep -qi alma "$rh_file" && os_type=alma
grep -qs -i rocky "$rh_file" && os_type=rocky
grep -qs -i alma "$rh_file" && os_type=alma
if grep -qs "release 7" "$rh_file"; then
os_ver=7
elif grep -qs "release 8" "$rh_file"; then