ipsec: Fix stop command on systems where sleep(1) only supports integers

Fixes #1231.
This commit is contained in:
Tobias Brunner
2015-12-10 11:46:21 +01:00
parent bb723f97c7
commit 7f52715655
+7 -2
View File
@@ -259,10 +259,15 @@ stop)
loop=110
while [ $loop -gt 0 ] ; do
kill -0 $spid 2>/dev/null || break
sleep 0.1
sleep 0.1 2>/dev/null
if [ $? -ne 0 ]
then
sleep 1
loop=$(($loop - 9))
fi
loop=$(($loop - 1))
done
if [ $loop -eq 0 ]
if [ $loop -le 0 ]
then
kill -KILL $spid 2>/dev/null
rm -f $IPSEC_STARTER_PID