openconnect: set config variable on teardown and correctly pass the password

This addresses https://dev.openwrt.org/ticket/16634

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
This commit is contained in:
Nikos Mavrogiannopoulos
2014-08-31 23:57:47 +02:00
parent 3a78fe047a
commit e9215bf85d
3 changed files with 19 additions and 2 deletions
+14
View File
@@ -0,0 +1,14 @@
#!/bin/sh
# This script wraps openconnect in order to obtain the password
# file from cmd.
# $1 password file
# $2... are passed to openconnect
test -z "$1" && exit 1
pwfile=$1
shift
cat $pwfile|/usr/sbin/openconnect $*