diff options
-rwxr-xr-x | t_client.sh.in | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/t_client.sh.in b/t_client.sh.in index 664b2fd..b273964 100755 --- a/t_client.sh.in +++ b/t_client.sh.in @@ -12,6 +12,16 @@ # - for "ping6" checks: fping6 binary in $PATH # +if [ -r ./t_client.rc ] ; then + . ./t_client.rc +elif [ -r "${srcdir}"/t_client.rc ] ; then + . "${srcdir}"/t_client.rc +else + echo "$0: cannot find 't_client.rc' in current directory or" >&2 + echo "$0: source dir ('${srcdir}'). SKIPPING TEST." >&2 + exit 77 +fi + if [ ! -x ./openvpn ] then echo "no (executable) openvpn binary in current directory. FAIL." >&2 @@ -24,24 +34,14 @@ then exit 1 fi -if [ -r ./t_client.rc ] ; then - . ./t_client.rc -elif [ -r "${srcdir}"/t_client.rc ] ; then - . "${srcdir}"/t_client.rc -else - echo "cannot find 't_client.rc' in current directory or" >&2 - echo "source dir ('${srcdir}'). FAIL." >&2 - exit 1 -fi - if [ -z "$CA_CERT" ] ; then echo "CA_CERT not defined in 't_client.rc'. SKIP test." >&2 - exit 0 + exit 77 fi if [ -z "$TEST_RUN_LIST" ] ; then echo "TEST_RUN_LIST empty, no tests defined. SKIP test." >&2 - exit 0 + exit 77 fi # make sure we have permissions to run ifconfig/route from OpenVPN @@ -51,7 +51,7 @@ if expr "$ID" : "uid=0" >/dev/null then : else echo "$0: this test must run be as root. SKIP." >&2 - exit 0 + exit 77 fi LOGDIR=t_client-`hostname`-`date +%Y%m%d-%H%M%S` |