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

Update Alpine Linux versions

- Add Alpine Linux 3.19 and remove 3.17.
This commit is contained in:
hwdsl2 2024-02-03 15:24:29 -06:00
parent b7b3fc3169
commit 5bb63dac28
5 changed files with 19 additions and 19 deletions

View File

@ -8,7 +8,7 @@
# The latest version of this script is available at: # The latest version of this script is available at:
# https://github.com/hwdsl2/setup-ipsec-vpn # https://github.com/hwdsl2/setup-ipsec-vpn
# #
# Copyright (C) 2020-2023 Lin Song <linsongui@gmail.com> # Copyright (C) 2020-2024 Lin Song <linsongui@gmail.com>
# #
# This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 # This work is licensed under the Creative Commons Attribution-ShareAlike 3.0
# Unported License: http://creativecommons.org/licenses/by-sa/3.0/ # Unported License: http://creativecommons.org/licenses/by-sa/3.0/
@ -96,8 +96,8 @@ EOF
esac esac
if [ "$os_type" = "alpine" ]; then if [ "$os_type" = "alpine" ]; then
os_ver=$(. /etc/os-release && printf '%s' "$VERSION_ID" | cut -d '.' -f 1,2) os_ver=$(. /etc/os-release && printf '%s' "$VERSION_ID" | cut -d '.' -f 1,2)
if [ "$os_ver" != "3.17" ] && [ "$os_ver" != "3.18" ]; then if [ "$os_ver" != "3.18" ] && [ "$os_ver" != "3.19" ]; then
exiterr "This script only supports Alpine Linux 3.17/3.18." exiterr "This script only supports Alpine Linux 3.18/3.19."
fi fi
else else
os_ver=$(sed 's/\..*//' /etc/debian_version | tr -dc 'A-Za-z0-9') os_ver=$(sed 's/\..*//' /etc/debian_version | tr -dc 'A-Za-z0-9')
@ -157,7 +157,7 @@ confirm_or_abort() {
show_header() { show_header() {
cat <<'EOF' cat <<'EOF'
IKEv2 Script Copyright (c) 2020-2023 Lin Song 13 Dec 2023 IKEv2 Script Copyright (c) 2020-2024 Lin Song 3 Feb 2024
EOF EOF
} }

View File

@ -6,7 +6,7 @@
# The latest version of this script is available at: # The latest version of this script is available at:
# https://github.com/hwdsl2/setup-ipsec-vpn # https://github.com/hwdsl2/setup-ipsec-vpn
# #
# Copyright (C) 2021-2023 Lin Song <linsongui@gmail.com> # Copyright (C) 2021-2024 Lin Song <linsongui@gmail.com>
# #
# This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 # This work is licensed under the Creative Commons Attribution-ShareAlike 3.0
# Unported License: http://creativecommons.org/licenses/by-sa/3.0/ # Unported License: http://creativecommons.org/licenses/by-sa/3.0/
@ -90,8 +90,8 @@ EOF
esac esac
if [ "$os_type" = "alpine" ]; then if [ "$os_type" = "alpine" ]; then
os_ver=$(. /etc/os-release && printf '%s' "$VERSION_ID" | cut -d '.' -f 1,2) os_ver=$(. /etc/os-release && printf '%s' "$VERSION_ID" | cut -d '.' -f 1,2)
if [ "$os_ver" != "3.17" ] && [ "$os_ver" != "3.18" ]; then if [ "$os_ver" != "3.18" ] && [ "$os_ver" != "3.19" ]; then
exiterr "This script only supports Alpine Linux 3.17/3.18." exiterr "This script only supports Alpine Linux 3.18/3.19."
fi fi
else else
os_ver=$(sed 's/\..*//' /etc/debian_version | tr -dc 'A-Za-z0-9') os_ver=$(sed 's/\..*//' /etc/debian_version | tr -dc 'A-Za-z0-9')

View File

@ -5,7 +5,7 @@
# The latest version of this script is available at: # The latest version of this script is available at:
# https://github.com/hwdsl2/setup-ipsec-vpn # https://github.com/hwdsl2/setup-ipsec-vpn
# #
# Copyright (C) 2021-2023 Lin Song <linsongui@gmail.com> # Copyright (C) 2021-2024 Lin Song <linsongui@gmail.com>
# #
# This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 # This work is licensed under the Creative Commons Attribution-ShareAlike 3.0
# Unported License: http://creativecommons.org/licenses/by-sa/3.0/ # Unported License: http://creativecommons.org/licenses/by-sa/3.0/
@ -51,8 +51,8 @@ check_os() {
;; ;;
esac esac
os_ver=$(. /etc/os-release && printf '%s' "$VERSION_ID" | cut -d '.' -f 1,2) os_ver=$(. /etc/os-release && printf '%s' "$VERSION_ID" | cut -d '.' -f 1,2)
if [ "$os_ver" != "3.17" ] && [ "$os_ver" != "3.18" ]; then if [ "$os_ver" != "3.18" ] && [ "$os_ver" != "3.19" ]; then
exiterr "This script only supports Alpine Linux 3.17/3.18." exiterr "This script only supports Alpine Linux 3.18/3.19."
fi fi
} }
@ -146,8 +146,8 @@ install_pkgs() {
bigecho "Installing required packages..." bigecho "Installing required packages..."
( (
set -x set -x
apk add -U -q bash bind-tools coreutils openssl wget iproute2 sed grep \ apk add -U -q bash bind-tools coreutils openssl wget iptables iproute2 \
libcap-ng libcurl libevent linux-pam musl nspr nss nss-tools \ sed grep libcap-ng libcurl libevent linux-pam musl nspr nss nss-tools \
bison flex gcc make libc-dev bsd-compat-headers linux-pam-dev nss-dev \ bison flex gcc make libc-dev bsd-compat-headers linux-pam-dev nss-dev \
libcap-ng-dev libevent-dev curl-dev nspr-dev uuidgen openrc libcap-ng-dev libevent-dev curl-dev nspr-dev uuidgen openrc
) || exiterr2 ) || exiterr2

View File

@ -8,7 +8,7 @@
# The latest version of this script is available at: # The latest version of this script is available at:
# https://github.com/hwdsl2/setup-ipsec-vpn # https://github.com/hwdsl2/setup-ipsec-vpn
# #
# Copyright (C) 2021-2023 Lin Song <linsongui@gmail.com> # Copyright (C) 2021-2024 Lin Song <linsongui@gmail.com>
# #
# This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 # This work is licensed under the Creative Commons Attribution-ShareAlike 3.0
# Unported License: http://creativecommons.org/licenses/by-sa/3.0/ # Unported License: http://creativecommons.org/licenses/by-sa/3.0/
@ -122,8 +122,8 @@ EOF
esac esac
if [ "$os_type" = "alpine" ]; then if [ "$os_type" = "alpine" ]; then
os_ver=$(. /etc/os-release && printf '%s' "$VERSION_ID" | cut -d '.' -f 1,2) os_ver=$(. /etc/os-release && printf '%s' "$VERSION_ID" | cut -d '.' -f 1,2)
if [ "$os_ver" != "3.17" ] && [ "$os_ver" != "3.18" ]; then if [ "$os_ver" != "3.18" ] && [ "$os_ver" != "3.19" ]; then
exiterr "This script only supports Alpine Linux 3.17/3.18." exiterr "This script only supports Alpine Linux 3.18/3.19."
fi fi
else else
os_ver=$(sed 's/\..*//' /etc/debian_version | tr -dc 'A-Za-z0-9') os_ver=$(sed 's/\..*//' /etc/debian_version | tr -dc 'A-Za-z0-9')

View File

@ -7,7 +7,7 @@
# The latest version of this script is available at: # The latest version of this script is available at:
# https://github.com/hwdsl2/setup-ipsec-vpn # https://github.com/hwdsl2/setup-ipsec-vpn
# #
# Copyright (C) 2021-2023 Lin Song <linsongui@gmail.com> # Copyright (C) 2021-2024 Lin Song <linsongui@gmail.com>
# #
# This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 # This work is licensed under the Creative Commons Attribution-ShareAlike 3.0
# Unported License: http://creativecommons.org/licenses/by-sa/3.0/ # Unported License: http://creativecommons.org/licenses/by-sa/3.0/
@ -70,8 +70,8 @@ check_os() {
;; ;;
esac esac
os_ver=$(. /etc/os-release && printf '%s' "$VERSION_ID" | cut -d '.' -f 1,2) os_ver=$(. /etc/os-release && printf '%s' "$VERSION_ID" | cut -d '.' -f 1,2)
if [ "$os_ver" != "3.17" ] && [ "$os_ver" != "3.18" ]; then if [ "$os_ver" != "3.18" ] && [ "$os_ver" != "3.19" ]; then
exiterr "This script only supports Alpine Linux 3.17/3.18." exiterr "This script only supports Alpine Linux 3.18/3.19."
fi fi
} }
@ -165,7 +165,7 @@ install_setup_pkgs() {
bigecho "Installing packages required for setup..." bigecho "Installing packages required for setup..."
( (
set -x set -x
apk add -U -q bash bind-tools coreutils openssl wget iproute2 sed grep apk add -U -q bash bind-tools coreutils openssl wget iptables iproute2 sed grep
) || exiterr2 ) || exiterr2
} }