Update OS support

- Add Alpine Linux 3.22 and remove 3.20
- Cleanup
This commit is contained in:
hwdsl2
2025-09-01 11:54:52 -05:00
parent e79c530c90
commit 15c65778a1
5 changed files with 7 additions and 18 deletions

View File

@@ -103,13 +103,10 @@ EOF
esac
if [ "$os_type" = "alpine" ]; then
os_ver=$(. /etc/os-release && printf '%s' "$VERSION_ID" | cut -d '.' -f 1,2)
if [ "$os_ver" != "3.20" ] && [ "$os_ver" != "3.21" ]; then
exiterr "This script only supports Alpine Linux 3.20/3.21."
fi
else
os_ver=$(sed 's/\..*//' /etc/debian_version | tr -dc 'A-Za-z0-9')
if [ "$os_ver" = 8 ] || [ "$os_ver" = 9 ] || [ "$os_ver" = "stretchsid" ] \
|| [ "$os_ver" = "bustersid" ]; then
|| [ "$os_ver" = "bustersid" ] || [ -z "$os_ver" ]; then
cat 1>&2 <<EOF
Error: This script requires Debian >= 10 or Ubuntu >= 20.04.
This version of Ubuntu/Debian is too old and not supported.
@@ -172,7 +169,7 @@ confirm_or_abort() {
show_header() {
cat <<'EOF'
IKEv2 Script Copyright (c) 2020-2025 Lin Song 12 May 2025
IKEv2 Script Copyright (c) 2020-2025 Lin Song 1 Sep 2025
EOF
}

View File

@@ -89,12 +89,7 @@ EOF
exit 1
;;
esac
if [ "$os_type" = "alpine" ]; then
os_ver=$(. /etc/os-release && printf '%s' "$VERSION_ID" | cut -d '.' -f 1,2)
if [ "$os_ver" != "3.20" ] && [ "$os_ver" != "3.21" ]; then
exiterr "This script only supports Alpine Linux 3.20/3.21."
fi
else
if [ "$os_type" != "alpine" ]; then
os_ver=$(sed 's/\..*//' /etc/debian_version | tr -dc 'A-Za-z0-9')
if [ "$os_ver" = 8 ] || [ "$os_ver" = 9 ] || [ "$os_ver" = "stretchsid" ] \
|| [ "$os_ver" = "bustersid" ] || [ -z "$os_ver" ]; then

View File

@@ -51,9 +51,6 @@ check_os() {
;;
esac
os_ver=$(. /etc/os-release && printf '%s' "$VERSION_ID" | cut -d '.' -f 1,2)
if [ "$os_ver" != "3.20" ] && [ "$os_ver" != "3.21" ]; then
exiterr "This script only supports Alpine Linux 3.20/3.21."
fi
}
check_libreswan() {