Browse code

Merge branch 'bugfix2.1' into beta2.2

David Sommerseth authored on 2010/08/19 01:08:23
Showing 1 changed files
... ...
@@ -12,6 +12,16 @@
12 12
 # - for "ping6" checks: fping6 binary in $PATH
13 13
 #
14 14
 
15
+if [ -r ./t_client.rc ] ; then
16
+    . ./t_client.rc
17
+elif [ -r "${srcdir}"/t_client.rc ] ; then
18
+    . "${srcdir}"/t_client.rc
19
+else
20
+    echo "$0: cannot find 't_client.rc' in current directory or" >&2
21
+    echo "$0: source dir ('${srcdir}').  SKIPPING TEST." >&2
22
+    exit 77
23
+fi
24
+
15 25
 if [ ! -x ./openvpn ]
16 26
 then
17 27
     echo "no (executable) openvpn binary in current directory. FAIL." >&2
... ...
@@ -24,24 +34,14 @@ then
24 24
     exit 1
25 25
 fi
26 26
 
27
-if [ -r ./t_client.rc ] ; then
28
-    . ./t_client.rc
29
-elif [ -r "${srcdir}"/t_client.rc ] ; then
30
-    . "${srcdir}"/t_client.rc
31
-else
32
-    echo "cannot find 't_client.rc' in current directory or" >&2
33
-    echo "source dir ('${srcdir}').  FAIL." >&2
34
-    exit 1
35
-fi
36
-
37 27
 if [ -z "$CA_CERT" ] ; then
38 28
     echo "CA_CERT not defined in 't_client.rc'. SKIP test." >&2
39
-    exit 0
29
+    exit 77
40 30
 fi
41 31
 
42 32
 if [ -z "$TEST_RUN_LIST" ] ; then
43 33
     echo "TEST_RUN_LIST empty, no tests defined.  SKIP test." >&2
44
-    exit 0
34
+    exit 77
45 35
 fi
46 36
 
47 37
 # make sure we have permissions to run ifconfig/route from OpenVPN
... ...
@@ -51,7 +51,7 @@ if expr "$ID" : "uid=0" >/dev/null
51 51
 then :
52 52
 else
53 53
     echo "$0: this test must run be as root. SKIP." >&2
54
-    exit 0
54
+    exit 77
55 55
 fi
56 56
 
57 57
 LOGDIR=t_client-`hostname`-`date +%Y%m%d-%H%M%S`