From 027c70edb091f9004bde6962f69cf24946ccb212 Mon Sep 17 00:00:00 2001 From: hwdsl2 Date: Mon, 7 Dec 2020 10:17:28 -0600 Subject: [PATCH] Update Debian check - Update upgrade scripts to work on Debian 8 for now. Debian 8 (Jessie) is EOL and users should upgrade to a newer Debian version. --- extras/vpnupgrade.sh | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/extras/vpnupgrade.sh b/extras/vpnupgrade.sh index d81db03..baa9283 100644 --- a/extras/vpnupgrade.sh +++ b/extras/vpnupgrade.sh @@ -33,11 +33,6 @@ if ! printf '%s' "$os_type" | head -n 1 | grep -qiF -e ubuntu -e debian -e raspb exit 1 fi -debian_ver=$(sed 's/\..*//' /etc/debian_version) -if [ "$debian_ver" = "8" ]; then - exiterr "Debian 8 is not supported." -fi - if [ -f /proc/user_beancounters ]; then exiterr "OpenVZ VPS is not supported." fi @@ -114,6 +109,16 @@ NOTE: This script will make the following changes to your IPsec config: EOF +debian_ver=$(sed 's/\..*//' /etc/debian_version) +if [ "$debian_ver" = "8" ]; then +cat <<'EOF' +WARNING: Debian 8 (Jessie) has reached its end-of-life on June 30, 2020. + Users should upgrade to a newer Debian version. + See: https://www.debian.org/News/2020/20200709 + +EOF +fi + case "$SWAN_VER" in 3.2[679]|3.3[12]) cat <<'EOF' @@ -175,7 +180,7 @@ cat > Makefile.inc.local <<'EOF' WERROR_CFLAGS=-w USE_DNSSEC=false EOF -if [ "$SWAN_VER" != "4.1" ]; then +if [ "$SWAN_VER" != "4.1" ] || [ "$debian_ver" = "8" ]; then cat >> Makefile.inc.local <<'EOF' USE_DH31=false USE_NSS_AVA_COPY=true @@ -185,10 +190,10 @@ EOF fi if [ "$SWAN_VER" = "3.31" ] || [ "$SWAN_VER" = "3.32" ] || [ "$SWAN_VER" = "4.1" ]; then echo "USE_DH2=true" >> Makefile.inc.local -fi -if [ "$SWAN_VER" = "3.31" ] || [ "$SWAN_VER" = "3.32" ]; then - if ! grep -qs IFLA_XFRM_LINK /usr/include/linux/if_link.h; then - echo "USE_XFRM_INTERFACE_IFLA_HEADER=true" >> Makefile.inc.local + if [ "$SWAN_VER" != "4.1" ] || [ "$debian_ver" = "8" ]; then + if ! grep -qs IFLA_XFRM_LINK /usr/include/linux/if_link.h; then + echo "USE_XFRM_INTERFACE_IFLA_HEADER=true" >> Makefile.inc.local + fi fi fi if [ "$SWAN_VER" = "4.1" ]; then