From 4ddf2ac169fbb4931b5268962b02cdca33323ccd Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Sat, 2 Jun 2012 15:45:11 +0200 Subject: bring openvpn in sync with openvpn git master and patches submitted to mailing list --- openvpn/tests/t_client.sh.in | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'openvpn/tests/t_client.sh.in') diff --git a/openvpn/tests/t_client.sh.in b/openvpn/tests/t_client.sh.in index 7ba124c9..d58b8210 100755 --- a/openvpn/tests/t_client.sh.in +++ b/openvpn/tests/t_client.sh.in @@ -14,16 +14,19 @@ srcdir="${srcdir:-.}" top_builddir="${top_builddir:-..}" -if [ -r "${srcdir}"/t_client.rc ] ; then +if [ -r "${top_builddir}"/t_client.rc ] ; then + . "${top_builddir}"/t_client.rc +elif [ -r "${srcdir}"/t_client.rc ] ; then . "${srcdir}"/t_client.rc else - echo "$0: cannot find 't_client.rc' in ('${srcdir}'). SKIPPING TEST." >&2 + echo "$0: cannot find 't_client.rc' in build dir ('${top_builddir}')" >&2 + echo "$0: or source directory ('${srcdir}'). SKIPPING TEST." >&2 exit 77 fi if [ ! -x "${top_builddir}/src/openvpn/openvpn" ] then - echo "no (executable) openvpn binary in current directory. FAIL." >&2 + echo "no (executable) openvpn binary in current build tree. FAIL." >&2 exit 1 fi @@ -83,12 +86,12 @@ fail() get_ifconfig_route() { # linux / iproute2? (-> if configure got a path) - if [ "@IPROUTE@" != "ip" ] + if [ -n "@IPROUTE@" ] then echo "-- linux iproute2 --" @IPROUTE@ addr show | grep -v valid_lft @IPROUTE@ route show - @IPROUTE@ -6 route show | sed -e 's/expires [0-9]*sec //' + @IPROUTE@ -o -6 route show | grep -v ' cache' | sed -e 's/expires [0-9]*sec //' return fi @@ -236,7 +239,7 @@ do trap "$RUN_SUDO kill $opid ; trap - 0 ; exit 1" 1 2 3 15 echo "wait for connection to establish..." - sleep 10 + sleep ${SETUP_TIME_WAIT:-10} # test whether OpenVPN process is still there if $RUN_SUDO kill -0 $opid -- cgit v1.2.3