mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 16:57:00 +08:00
tests: allow running tests with alternate OpenConnect
Allow $OPENCONNECT in the caller's environment to override the default openconnect system installation. Signed-off-by: Mike Miller <mtmiller@debian.org>
This commit is contained in:
committed by
Nikos Mavrogiannopoulos
parent
3af590bc6c
commit
e69a07ed6e
@@ -23,7 +23,12 @@
|
||||
|
||||
#this test can only be run as root
|
||||
|
||||
OPENCONNECT=/usr/sbin/openconnect
|
||||
OPENCONNECT=${OPENCONNECT:-/usr/sbin/openconnect}
|
||||
|
||||
if ! test -x ${OPENCONNECT};then
|
||||
echo "You need openconnect to run this test"
|
||||
exit 77
|
||||
fi
|
||||
|
||||
if test -z "$NO_NEED_ROOT";then
|
||||
id|grep root >/dev/null 2>&1
|
||||
@@ -36,12 +41,7 @@ else
|
||||
export SOCKET_WRAPPER_DIR=$SOCKDIR
|
||||
export SOCKET_WRAPPER_DEFAULT_IFACE=2
|
||||
ADDRESS=127.0.0.$SOCKET_WRAPPER_DEFAULT_IFACE
|
||||
OPENCONNECT="eval LD_PRELOAD=libsocket_wrapper.so /usr/sbin/openconnect"
|
||||
fi
|
||||
|
||||
if ! test -x /usr/sbin/openconnect;then
|
||||
echo "You need openconnect to run this test"
|
||||
exit 77
|
||||
OPENCONNECT="eval LD_PRELOAD=libsocket_wrapper.so ${OPENCONNECT}"
|
||||
fi
|
||||
|
||||
update_config() {
|
||||
|
||||
Reference in New Issue
Block a user