From 5a13026701f3f7d4bafad55e89dbb81fe4e75ed8 Mon Sep 17 00:00:00 2001 From: hwdsl2 Date: Wed, 11 Nov 2020 23:05:29 -0600 Subject: [PATCH] Apply Libreswan fix - Fix detection for sysvinit initsystem: https://github.com/libreswan/libreswan/commit/cfe4dabab410089af624f412c92fcfa940327c73 --- extras/vpnupgrade.sh | 1 + extras/vpnupgrade_centos.sh | 1 + vpnsetup.sh | 1 + vpnsetup_centos.sh | 1 + 4 files changed, 4 insertions(+) diff --git a/extras/vpnupgrade.sh b/extras/vpnupgrade.sh index 9d041cf..57fb8f4 100644 --- a/extras/vpnupgrade.sh +++ b/extras/vpnupgrade.sh @@ -217,6 +217,7 @@ if [ "$SWAN_VER" = "3.31" ]; then sed -i '1033s/if (/if (LIN(POLICY_IKE_FRAG_ALLOW, sk->ike->sa.st_connection->policy) \&\& sk->ike->sa.st_seen_fragvid \&\& /' \ programs/pluto/ikev2_message.c fi +[ "$SWAN_VER" = "4.1" ] && sed -i 's/ sysv )/ sysvinit )/' programs/setup/setup.in cat > Makefile.inc.local <<'EOF' WERROR_CFLAGS=-w USE_DNSSEC=false diff --git a/extras/vpnupgrade_centos.sh b/extras/vpnupgrade_centos.sh index d837aa9..f39417e 100644 --- a/extras/vpnupgrade_centos.sh +++ b/extras/vpnupgrade_centos.sh @@ -224,6 +224,7 @@ if [ "$SWAN_VER" = "3.31" ]; then sed -i '1033s/if (/if (LIN(POLICY_IKE_FRAG_ALLOW, sk->ike->sa.st_connection->policy) \&\& sk->ike->sa.st_seen_fragvid \&\& /' \ programs/pluto/ikev2_message.c fi +[ "$SWAN_VER" = "4.1" ] && sed -i 's/ sysv )/ sysvinit )/' programs/setup/setup.in cat > Makefile.inc.local <<'EOF' WERROR_CFLAGS=-w USE_DNSSEC=false diff --git a/vpnsetup.sh b/vpnsetup.sh index b4df81a..f7afaf6 100755 --- a/vpnsetup.sh +++ b/vpnsetup.sh @@ -192,6 +192,7 @@ fi /bin/rm -rf "/opt/src/libreswan-$SWAN_VER" tar xzf "$swan_file" && /bin/rm -f "$swan_file" cd "libreswan-$SWAN_VER" || exit 1 +sed -i 's/ sysv )/ sysvinit )/' programs/setup/setup.in cat > Makefile.inc.local <<'EOF' WERROR_CFLAGS=-w USE_DNSSEC=false diff --git a/vpnsetup_centos.sh b/vpnsetup_centos.sh index 6bf420b..e0bbf4d 100755 --- a/vpnsetup_centos.sh +++ b/vpnsetup_centos.sh @@ -195,6 +195,7 @@ fi /bin/rm -rf "/opt/src/libreswan-$SWAN_VER" tar xzf "$swan_file" && /bin/rm -f "$swan_file" cd "libreswan-$SWAN_VER" || exit 1 +sed -i 's/ sysv )/ sysvinit )/' programs/setup/setup.in cat > Makefile.inc.local <<'EOF' WERROR_CFLAGS=-w USE_DNSSEC=false