diff options
author | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2005-11-05 07:42:33 +0000 |
---|---|---|
committer | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2005-11-05 07:42:33 +0000 |
commit | e8c1720d8476aa310bf470d023e59f3d5e14a84a (patch) | |
tree | 3c82f6ae7e5f9238a7788e80d4271d55d3cbe581 /t_cltsrv.sh | |
parent | Allow blank passwords to be passed via the management interface. (diff) | |
download | openvpn-e8c1720d8476aa310bf470d023e59f3d5e14a84a.tar.xz |
svn merge -r 771:780 $SO/trunk/openvpn
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@781 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 't_cltsrv.sh')
-rwxr-xr-x | t_cltsrv.sh | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/t_cltsrv.sh b/t_cltsrv.sh index 1e157e4..65c12ab 100755 --- a/t_cltsrv.sh +++ b/t_cltsrv.sh @@ -20,19 +20,33 @@ set -e echo "the following test will run about two minutes..." >&2 -trap "rm -f log.$$ ; false" 1 2 3 15 +trap "rm -f log.$$ log.$$.signal ; trap 0 ; exit 77" 1 2 15 +trap "rm -f log.$$ log.$$.signal ; exit 1" 0 3 +addopts= +case `uname -s` in + FreeBSD) + # FreeBSD jails map the outgoing IP to the jail IP - we need to + # allow the real IP unless we want the test to run forever. + if test `sysctl -n security.jail.jailed` != 0 ; then + addopts="--float" + fi + ;; +esac set +e ( -./openvpn --cd "${srcdir}" --config sample-config-files/loopback-server & -./openvpn --cd "${srcdir}" --config sample-config-files/loopback-client -) >log.$$ 2>&1 +./openvpn --cd "${srcdir}" ${addopts} --down 'echo "srv:${signal}" >&3 ; : #' --tls-exit --ping-exit 180 --config sample-config-files/loopback-server & +./openvpn --cd "${srcdir}" ${addopts} --down 'echo "clt:${signal}" >&3 ; : #' --tls-exit --ping-exit 180 --config sample-config-files/loopback-client +) 3>log.$$.signal >log.$$ 2>&1 e1=$? wait $! e2=$? +grep -v ":inactive$" log.$$.signal >/dev/null && { cat log.$$.signal ; echo ; cat log.$$ ; exit 1 ; } + set -e if [ $e1 != 0 ] || [ $e2 != 0 ] ; then cat log.$$ exit 1 fi -rm log.$$ +rm log.$$ log.$$.signal +trap 0 |