Browse Source

strongswan: run sleep with integer argument

The default busybox config used by OpenWrt does not enable floating
point number support for the sleep applet. This can cause an error when
stopping or restarting strongswan:

sleep: invalid number '0.1'

Replace the float with an integer to fix this.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
lilik-openwrt-22.03
Stijn Tintel 9 years ago
parent
commit
064d166efd
2 changed files with 12 additions and 1 deletions
  1. +1
    -1
      net/strongswan/Makefile
  2. +11
    -0
      net/strongswan/patches/210-sleep.patch

+ 1
- 1
net/strongswan/Makefile View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=strongswan
PKG_VERSION:=5.3.5
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://download.strongswan.org/ http://download2.strongswan.org/


+ 11
- 0
net/strongswan/patches/210-sleep.patch View File

@ -0,0 +1,11 @@
--- a/src/ipsec/_ipsec.in
+++ b/src/ipsec/_ipsec.in
@@ -259,7 +259,7 @@ stop)
loop=110
while [ $loop -gt 0 ] ; do
kill -0 $spid 2>/dev/null || break
- sleep 0.1
+ sleep 1
loop=$(($loop - 1))
done
if [ $loop -eq 0 ]

Loading…
Cancel
Save