1
0
mirror of synced 2024-11-22 04:56:03 +03:00

Add Oracle Linux 9

This commit is contained in:
hwdsl2 2022-07-30 09:31:27 -05:00
parent 6ca52bf0e0
commit 200da23776
3 changed files with 9 additions and 12 deletions

View File

@ -88,9 +88,6 @@ check_os() {
elif grep -qs "release 9" "$rh_file"; then
os_ver=9
grep -qi stream "$rh_file" && os_ver=9s
if [ "$os_type" = "ol" ]; then
exiterr "Oracle Linux 9 is not supported."
fi
elif grep -qs "Amazon Linux release 2" /etc/system-release; then
os_type=amzn
os_ver=2

View File

@ -88,9 +88,6 @@ check_os() {
elif grep -qs "release 9" "$rh_file"; then
os_ver=9
grep -qi stream "$rh_file" && os_ver=9s
if [ "$os_type" = "ol" ]; then
exiterr "Oracle Linux 9 is not supported."
fi
elif grep -qs "Amazon Linux release 2" /etc/system-release; then
os_type=amzn
os_ver=2

View File

@ -93,9 +93,6 @@ check_os() {
elif grep -qs "release 9" "$rh_file"; then
os_ver=9
grep -qi stream "$rh_file" && os_ver=9s
if [ "$os_type" = "ol" ]; then
exiterr "Oracle Linux 9 is not supported."
fi
else
cat 1>&2 <<'EOF'
Error: This script only supports one of the following OS:
@ -629,7 +626,9 @@ apply_gcp_mtu_fix() {
enable_on_boot() {
bigecho "Enabling services on boot..."
systemctl --now mask firewalld 2>/dev/null
if [ "$use_nft" = "1" ]; then
if [ "$os_type$os_ver" = "ol9" ]; then
systemctl enable nftables 2>/dev/null
elif [ "$use_nft" = "1" ]; then
systemctl enable nftables fail2ban 2>/dev/null
else
systemctl enable iptables fail2ban 2>/dev/null
@ -743,12 +742,16 @@ vpnsetup() {
install_vpn_pkgs_1
install_vpn_pkgs_2
install_vpn_pkgs_3
if [ "$os_type$os_ver" != "ol9" ]; then
install_fail2ban
fi
get_helper_scripts
get_libreswan
install_libreswan
create_vpn_config
if [ "$os_type$os_ver" != "ol9" ]; then
create_f2b_config
fi
update_sysctl
update_iptables
apply_gcp_mtu_fix