From c454ac15bdfc7050deae012eb20fadbf005b6b37 Mon Sep 17 00:00:00 2001 From: Alexander Wilhelm Date: Tue, 24 Nov 2026 14:15:50 +0100 Subject: [PATCH] strongswan: fix swanctl restart without /var/ipsec '/etc/init.d/swanctl restart' does not start charon if /var/ipsec does not exist, e.g. after boot with the service disabled. stop_service calls file_reset, which truncates /var/ipsec/strongswan.conf with a redirect. In ash a failing redirect on the special builtin ':' terminates the shell, so the init script exits before start_service runs. Create the parent directory in file_reset. Signed-off-by: Alexander Wilhelm --- net/strongswan/Makefile | 2 +- net/strongswan/files/swanctl.init | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/net/strongswan/Makefile b/net/strongswan/Makefile index e968655b87..c307c4c74b 100644 --- a/net/strongswan/Makefile +++ b/net/strongswan/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=strongswan PKG_VERSION:=6.0.7 -PKG_RELEASE:=13 +PKG_RELEASE:=14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://download.strongswan.org/ https://download2.strongswan.org/ diff --git a/net/strongswan/files/swanctl.init b/net/strongswan/files/swanctl.init index 81d5998b09..d8cb888c9c 100644 --- a/net/strongswan/files/swanctl.init +++ b/net/strongswan/files/swanctl.init @@ -58,6 +58,7 @@ seconds2time() { } file_reset() { + mkdir -p "${1%/*}" : > "$1" }