Compare commits
2 Commits
d22b32d4c6
...
8973b8d6c0
Author | SHA1 | Date | |
---|---|---|---|
|
8973b8d6c0 | ||
|
1dbf897500 |
10
.github/workflows/test_set_1.yml
vendored
10
.github/workflows/test_set_1.yml
vendored
@ -86,8 +86,8 @@ jobs:
|
|||||||
yum -y -q update
|
yum -y -q update
|
||||||
yum -y -q install wget rsyslog
|
yum -y -q install wget rsyslog
|
||||||
if grep -qs 'release 9' /etc/redhat-release; then
|
if grep -qs 'release 9' /etc/redhat-release; then
|
||||||
if grep -qi rocky /etc/redhat-release \
|
if grep -qs -i rocky /etc/redhat-release \
|
||||||
|| grep -qi alma /etc/redhat-release; then
|
|| grep -qs -i alma /etc/redhat-release; then
|
||||||
yum -y -q install diffutils
|
yum -y -q install diffutils
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -144,13 +144,13 @@ jobs:
|
|||||||
y
|
y
|
||||||
ANSWERS
|
ANSWERS
|
||||||
rm -f /etc/ipsec.d/vpnclient*
|
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
|
|| grep -qs -E 'release (8|9)' /etc/oracle-release; then
|
||||||
mkdir /etc/xl2tpd
|
mkdir /etc/xl2tpd
|
||||||
fi
|
fi
|
||||||
if grep -qs 'release 9' /etc/redhat-release; then
|
if grep -qs 'release 9' /etc/redhat-release; then
|
||||||
if grep -qi rocky /etc/redhat-release \
|
if grep -qs -i rocky /etc/redhat-release \
|
||||||
|| grep -qi alma /etc/redhat-release; then
|
|| grep -qs -i alma /etc/redhat-release; then
|
||||||
mkdir /etc/xl2tpd
|
mkdir /etc/xl2tpd
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -44,8 +44,8 @@ check_os() {
|
|||||||
[ -f /etc/oracle-release ] && os_type=ol
|
[ -f /etc/oracle-release ] && os_type=ol
|
||||||
if grep -qs "release 7" "$rh_file" || grep -qs "release 8" "$rh_file" \
|
if grep -qs "release 7" "$rh_file" || grep -qs "release 8" "$rh_file" \
|
||||||
|| grep -qs "release 9" "$rh_file"; then
|
|| grep -qs "release 9" "$rh_file"; then
|
||||||
grep -qi rocky "$rh_file" && os_type=rocky
|
grep -qs -i rocky "$rh_file" && os_type=rocky
|
||||||
grep -qi alma "$rh_file" && os_type=alma
|
grep -qs -i alma "$rh_file" && os_type=alma
|
||||||
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_type=amzn
|
||||||
else
|
else
|
||||||
|
@ -53,8 +53,8 @@ check_os() {
|
|||||||
os_type=rhel
|
os_type=rhel
|
||||||
fi
|
fi
|
||||||
[ -f /etc/oracle-release ] && os_type=ol
|
[ -f /etc/oracle-release ] && os_type=ol
|
||||||
grep -qi rocky "$rh_file" && os_type=rocky
|
grep -qs -i rocky "$rh_file" && os_type=rocky
|
||||||
grep -qi alma "$rh_file" && os_type=alma
|
grep -qs -i alma "$rh_file" && os_type=alma
|
||||||
if grep -qs "release 7" "$rh_file"; then
|
if grep -qs "release 7" "$rh_file"; then
|
||||||
os_ver=7
|
os_ver=7
|
||||||
elif grep -qs "release 8" "$rh_file"; then
|
elif grep -qs "release 8" "$rh_file"; then
|
||||||
@ -154,7 +154,7 @@ confirm_or_abort() {
|
|||||||
show_header() {
|
show_header() {
|
||||||
cat <<'EOF'
|
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
|
EOF
|
||||||
}
|
}
|
||||||
|
@ -75,8 +75,8 @@ check_os() {
|
|||||||
os_type=rhel
|
os_type=rhel
|
||||||
fi
|
fi
|
||||||
[ -f /etc/oracle-release ] && os_type=ol
|
[ -f /etc/oracle-release ] && os_type=ol
|
||||||
grep -qi rocky "$rh_file" && os_type=rocky
|
grep -qs -i rocky "$rh_file" && os_type=rocky
|
||||||
grep -qi alma "$rh_file" && os_type=alma
|
grep -qs -i alma "$rh_file" && os_type=alma
|
||||||
if grep -qs "release 7" "$rh_file"; then
|
if grep -qs "release 7" "$rh_file"; then
|
||||||
os_ver=7
|
os_ver=7
|
||||||
elif grep -qs "release 8" "$rh_file"; then
|
elif grep -qs "release 8" "$rh_file"; then
|
||||||
|
@ -42,8 +42,8 @@ check_os() {
|
|||||||
[ -f /etc/oracle-release ] && os_type=ol
|
[ -f /etc/oracle-release ] && os_type=ol
|
||||||
if grep -qs "release 7" "$rh_file" || grep -qs "release 8" "$rh_file" \
|
if grep -qs "release 7" "$rh_file" || grep -qs "release 8" "$rh_file" \
|
||||||
|| grep -qs "release 9" "$rh_file"; then
|
|| grep -qs "release 9" "$rh_file"; then
|
||||||
grep -qi rocky "$rh_file" && os_type=rocky
|
grep -qs -i rocky "$rh_file" && os_type=rocky
|
||||||
grep -qi alma "$rh_file" && os_type=alma
|
grep -qs -i alma "$rh_file" && os_type=alma
|
||||||
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_type=amzn
|
||||||
else
|
else
|
||||||
|
@ -43,8 +43,8 @@ check_os() {
|
|||||||
os_type=rhel
|
os_type=rhel
|
||||||
fi
|
fi
|
||||||
[ -f /etc/oracle-release ] && os_type=ol
|
[ -f /etc/oracle-release ] && os_type=ol
|
||||||
grep -qi rocky "$rh_file" && os_type=rocky
|
grep -qs -i rocky "$rh_file" && os_type=rocky
|
||||||
grep -qi alma "$rh_file" && os_type=alma
|
grep -qs -i alma "$rh_file" && os_type=alma
|
||||||
if grep -qs "release 7" "$rh_file"; then
|
if grep -qs "release 7" "$rh_file"; then
|
||||||
os_ver=7
|
os_ver=7
|
||||||
elif grep -qs "release 8" "$rh_file"; then
|
elif grep -qs "release 8" "$rh_file"; then
|
||||||
|
@ -46,8 +46,8 @@ check_os() {
|
|||||||
os_type=rhel
|
os_type=rhel
|
||||||
fi
|
fi
|
||||||
[ -f /etc/oracle-release ] && os_type=ol
|
[ -f /etc/oracle-release ] && os_type=ol
|
||||||
grep -qi rocky "$rh_file" && os_type=rocky
|
grep -qs -i rocky "$rh_file" && os_type=rocky
|
||||||
grep -qi alma "$rh_file" && os_type=alma
|
grep -qs -i alma "$rh_file" && os_type=alma
|
||||||
if grep -qs "release 7" "$rh_file"; then
|
if grep -qs "release 7" "$rh_file"; then
|
||||||
os_ver=7
|
os_ver=7
|
||||||
elif grep -qs "release 8" "$rh_file"; then
|
elif grep -qs "release 8" "$rh_file"; then
|
||||||
|
@ -75,8 +75,8 @@ check_os() {
|
|||||||
os_type=rhel
|
os_type=rhel
|
||||||
fi
|
fi
|
||||||
[ -f /etc/oracle-release ] && os_type=ol
|
[ -f /etc/oracle-release ] && os_type=ol
|
||||||
grep -qi rocky "$rh_file" && os_type=rocky
|
grep -qs -i rocky "$rh_file" && os_type=rocky
|
||||||
grep -qi alma "$rh_file" && os_type=alma
|
grep -qs -i alma "$rh_file" && os_type=alma
|
||||||
if grep -qs "release 7" "$rh_file"; then
|
if grep -qs "release 7" "$rh_file"; then
|
||||||
os_ver=7
|
os_ver=7
|
||||||
elif grep -qs "release 8" "$rh_file"; then
|
elif grep -qs "release 8" "$rh_file"; then
|
||||||
|
@ -80,8 +80,8 @@ check_os() {
|
|||||||
os_type=rhel
|
os_type=rhel
|
||||||
fi
|
fi
|
||||||
[ -f /etc/oracle-release ] && os_type=ol
|
[ -f /etc/oracle-release ] && os_type=ol
|
||||||
grep -qi rocky "$rh_file" && os_type=rocky
|
grep -qs -i rocky "$rh_file" && os_type=rocky
|
||||||
grep -qi alma "$rh_file" && os_type=alma
|
grep -qs -i alma "$rh_file" && os_type=alma
|
||||||
if grep -qs "release 7" "$rh_file"; then
|
if grep -qs "release 7" "$rh_file"; then
|
||||||
os_ver=7
|
os_ver=7
|
||||||
elif grep -qs "release 8" "$rh_file"; then
|
elif grep -qs "release 8" "$rh_file"; then
|
||||||
|
Loading…
Reference in New Issue
Block a user