git.99rst.org
/
openwrt-packages.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
e9215bf
)
openconnect: openconnect-wrapper would trap signals and send the correct one to server
author
Nikos Mavrogiannopoulos
<redacted>
Sun, 31 Aug 2014 23:09:39 +0000
(
01:09
+0200)
committer
Nikos Mavrogiannopoulos
<redacted>
Sun, 31 Aug 2014 23:09:39 +0000
(
01:09
+0200)
Signed-off-by: Nikos Mavrogiannopoulos <redacted>
net/openconnect/files/openconnect-wrapper
patch
|
blob
|
history
diff --git
a/net/openconnect/files/openconnect-wrapper
b/net/openconnect/files/openconnect-wrapper
index eb2df54f4fe4f7bf88f1188ddd7b8a78f4d43e52..744e5a5cd00ee22a24ea10623a07757abbd15f86 100755
(executable)
--- a/
net/openconnect/files/openconnect-wrapper
+++ b/
net/openconnect/files/openconnect-wrapper
@@
-11,4
+11,21
@@
test -z "$1" && exit 1
pwfile=$1
shift
-cat $pwfile|/usr/sbin/openconnect $*
+pidfile=/var/run/ocwrap-$$.pid
+
+cleanup()
+{
+ if ! test -z "$pid";then
+ kill $pid
+ wait $pid
+ fi
+ exit 0
+}
+
+trap cleanup 1 2 3 6 15
+
+rm -f "$pidfile"
+/usr/sbin/openconnect $* <$pwfile &
+pid=$!
+
+wait $pid
git clone https://git.99rst.org/PROJECT