strongswan: run sleep with integer argument
authorStijn Tintel <stijn@linux-ipv6.be>
Mon, 29 Feb 2016 04:21:16 +0000 (05:21 +0100)
committerStijn Tintel <stijn@linux-ipv6.be>
Wed, 6 Jul 2016 17:54:40 +0000 (19:54 +0200)
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>
net/strongswan/Makefile
net/strongswan/patches/210-sleep.patch [new file with mode: 0644]

index 84cdaf1d2f82f759e2267285889ed245e3b80a00..88ed0a50e4a055da7002d6b818d1614949d730b5 100644 (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/
diff --git a/net/strongswan/patches/210-sleep.patch b/net/strongswan/patches/210-sleep.patch
new file mode 100644 (file)
index 0000000..ea79967
--- /dev/null
@@ -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 ]