mirror of
https://github.com/openwrt/packages.git
synced 2026-11-29 03:23:20 +04:00
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 <alexander.wilhelm@westermo.com>
This commit is contained in:
1 parent
f35b71096c
commit
c454ac15bd
2 files changed
+2
-1
No files matched your search
@@ -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/
|
||||
|
||||
@@ -58,6 +58,7 @@ seconds2time() {
|
||||
}
|
||||
|
||||
file_reset() {
|
||||
mkdir -p "${1%/*}"
|
||||
: > "$1"
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user