strongswan.org
Wiki/Project Management
Downloads
Gitweb
projects
/
strongswan.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bb723f9
)
ipsec: Fix stop command on systems where sleep(1) only supports integers
author
Tobias Brunner
<tobias@strongswan.org>
Thu, 10 Dec 2015 10:46:21 +0000
(11:46 +0100)
committer
Tobias Brunner
<tobias@strongswan.org>
Thu, 10 Dec 2015 10:46:21 +0000
(11:46 +0100)
Fixes #1231.
src/ipsec/_ipsec.in
patch
|
blob
|
history
diff --git
a/src/ipsec/_ipsec.in
b/src/ipsec/_ipsec.in
index
89c7ef7
..
a002614
100644
(file)
--- a/
src/ipsec/_ipsec.in
+++ b/
src/ipsec/_ipsec.in
@@
-259,10
+259,15
@@
stop)
loop=110
while [ $loop -gt 0 ] ; do
kill -0 $spid 2>/dev/null || break
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
loop=$(($loop - 1))
done
- if [ $loop -
eq
0 ]
+ if [ $loop -
le
0 ]
then
kill -KILL $spid 2>/dev/null
rm -f $IPSEC_STARTER_PID
then
kill -KILL $spid 2>/dev/null
rm -f $IPSEC_STARTER_PID