[packages/strongswan] Rel 3; pid/starting fixes

arekm arekm at pld-linux.org
Thu Mar 26 16:33:42 CET 2026


commit 1e756ac8e409b4dc654166b73d4bff7ca8d1ed9f
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Thu Mar 26 16:33:20 2026 +0100

    Rel 3; pid/starting fixes

 strongswan.init | 12 ++++++++----
 strongswan.spec |  2 +-
 2 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/strongswan.spec b/strongswan.spec
index b47019e..51e09d5 100644
--- a/strongswan.spec
+++ b/strongswan.spec
@@ -4,7 +4,7 @@
 Summary:	IPsec-based VPN Solution for Linux
 Name:		strongswan
 Version:	6.0.5
-Release:	2
+Release:	3
 License:	GPL v2
 Group:		Networking/Daemons
 Source0:	http://download.strongswan.org/%{name}-%{version}.tar.bz2
diff --git a/strongswan.init b/strongswan.init
index b02d434..c624a93 100644
--- a/strongswan.init
+++ b/strongswan.init
@@ -30,7 +30,7 @@ else
 	exit 0
 fi
 
-PIDFILE=/var/run/strongswan/starter.charon.pid
+PIDFILE=/run/strongswan/starter.charon.pid
 
 RETVAL=0
 case "$1" in
@@ -42,6 +42,11 @@ case "$1" in
 		if [ $RETVAL -eq 0 ]; then
 			touch /var/lock/subsys/strongswan
 			show "Loading swanctl configuration"
+			# wait for charon to accept vici connections (starter forks before charon is ready)
+			for i in 1 2 3 4 5; do
+				/usr/sbin/swanctl --stats >/dev/null 2>&1 && break
+				sleep 1
+			done
 			daemon /usr/sbin/swanctl --load-all --noprompt
 		fi
 	else
@@ -51,8 +56,7 @@ case "$1" in
   stop)
 	if [ -f /var/lock/subsys/strongswan ]; then
 		msg_stopping "strongSwan"
-		/usr/sbin/strongswan stop
-		RETVAL=$?
+		daemon /usr/sbin/strongswan stop
 		rm -f /var/lock/subsys/strongswan
 	else
 		msg_not_running "strongSwan"
@@ -76,7 +80,7 @@ case "$1" in
 	fi
 	;;
   status)
-	status --pidfile $PIDFILE starter
+	status --pidfile $PIDFILE strongswan starter
 	RETVAL=$?
 	if [ $RETVAL -eq 0 ]; then
 		/usr/sbin/strongswan statusall
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/strongswan.git/commitdiff/1e756ac8e409b4dc654166b73d4bff7ca8d1ed9f



More information about the pld-cvs-commit mailing list