mirror of
https://github.com/novatiq/packages.git
synced 2026-04-29 23:18:42 +01:00
Merge pull request #4494 from yousong/openconnect
openconnect: openconnect-wrapper: rewrite
This commit is contained in:
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=openconnect
|
PKG_NAME:=openconnect
|
||||||
PKG_VERSION:=7.08
|
PKG_VERSION:=7.08
|
||||||
PKG_RELEASE:=3
|
PKG_RELEASE:=4
|
||||||
PKG_USE_MIPS16:=0
|
PKG_USE_MIPS16:=0
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
|||||||
@@ -10,32 +10,4 @@ test -z "$1" && exit 1
|
|||||||
|
|
||||||
pwfile=$1
|
pwfile=$1
|
||||||
shift
|
shift
|
||||||
|
exec /usr/sbin/openconnect "$@" <$pwfile
|
||||||
pidfile=/var/run/ocwrap-$$.pid
|
|
||||||
|
|
||||||
cleanup()
|
|
||||||
{
|
|
||||||
if ! test -z "$pid";then
|
|
||||||
kill $pid
|
|
||||||
wait $pid
|
|
||||||
fi
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
cleanup2()
|
|
||||||
{
|
|
||||||
if ! test -z "$pid";then
|
|
||||||
kill -2 $pid
|
|
||||||
wait $pid
|
|
||||||
fi
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
trap cleanup2 2
|
|
||||||
trap cleanup 1 3 6 15
|
|
||||||
|
|
||||||
rm -f "$pidfile"
|
|
||||||
/usr/sbin/openconnect $* <$pwfile &
|
|
||||||
pid=$!
|
|
||||||
|
|
||||||
wait $pid
|
|
||||||
|
|||||||
Reference in New Issue
Block a user