Browse Source

openconnect: forward SIGINT to app

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Nikos Mavrogiannopoulos 10 years ago
parent
commit
a412f2cc46
2 changed files with 12 additions and 2 deletions
  1. 1
    1
      net/openconnect/Makefile
  2. 11
    1
      net/openconnect/files/openconnect-wrapper

+ 1
- 1
net/openconnect/Makefile View File

@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
9 9
 
10 10
 PKG_NAME:=openconnect
11 11
 PKG_VERSION:=6.00
12
-PKG_RELEASE:=3
12
+PKG_RELEASE:=4
13 13
 
14 14
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 15
 PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/openconnect/

+ 11
- 1
net/openconnect/files/openconnect-wrapper View File

@@ -22,7 +22,17 @@ cleanup()
22 22
 	exit 0
23 23
 }
24 24
 
25
-trap cleanup 1 2 3 6 15
25
+cleanup2()
26
+{
27
+	if ! test -z "$pid";then
28
+		kill -2 $pid
29
+		wait $pid
30
+	fi
31
+	exit 0
32
+}
33
+
34
+trap cleanup2 2
35
+trap cleanup 1 3 6 15
26 36
 
27 37
 rm -f "$pidfile"
28 38
 /usr/sbin/openconnect $* <$pwfile &