aboutsummaryrefslogtreecommitdiff
path: root/t_client.sh
diff options
context:
space:
mode:
authorGert Doering <gert@greenie.muc.de>2010-08-10 12:39:28 +0200
committerDavid Sommerseth <dazo@users.sourceforge.net>2010-10-21 11:40:36 +0200
commit5086d75d8e8a3ec294cdb4ef5dacc403acc96bac (patch)
tree8c3d1d26b1e80a24ed0c20e9cbe1d0a25540915b /t_client.sh
parentfull "VPN client connect" test framework for OpenVPN (diff)
downloadopenvpn-5086d75d8e8a3ec294cdb4ef5dacc403acc96bac.tar.xz
Build t_client.sh by configure at run-time.
This is now built using "configure", knows how to find "ip", "ifconfig" and "netstat" (configure does the work :-) ), *and* has been tested on Solaris (works!). extend configure.ac to find "netstat" binary and to chmod +x "t_client.sh" Signed-off-by: Gert Doering <gert@greenie.muc.de> Acked-by: David Sommerseth <dazo@users.sourceforge.net> Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Diffstat (limited to '')
-rwxr-xr-x[-rw-r--r--]t_client.sh.in (renamed from t_client.sh)28
1 files changed, 14 insertions, 14 deletions
diff --git a/t_client.sh b/t_client.sh.in
index 3a0dadb..664b2fd 100644..100755
--- a/t_client.sh
+++ b/t_client.sh.in
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!@SHELL@
#
# run OpenVPN client against ``test reference'' server
# - check that ping, http, ... via tunnel works
@@ -79,13 +79,13 @@ fail()
# this is higly system dependent...
get_ifconfig_route()
{
- # linux / iproute2?
- if [ -x /sbin/ip -o -x /usr/sbin/ip ]
+ # linux / iproute2? (-> if configure got a path)
+ if [ "@IPROUTE@" != "ip" ]
then
echo "-- linux iproute2 --"
- ip addr show | grep -v valid_lft
- ip route show
- ip -6 route show | sed -e 's/expires [0-9]*sec //'
+ @IPROUTE@ addr show | grep -v valid_lft
+ @IPROUTE@ route show
+ @IPROUTE@ -6 route show | sed -e 's/expires [0-9]*sec //'
return
fi
@@ -93,27 +93,27 @@ get_ifconfig_route()
case `uname -s` in
Linux)
echo "-- linux / ifconfig --"
- LANG=C ifconfig -a |egrep "( addr:|encap:)"
- LANG=C netstat -rn -4 -6
+ LANG=C @IFCONFIG@ -a |egrep "( addr:|encap:)"
+ LANG=C @NETSTAT@ -rn -4 -6
return
;;
FreeBSD|NetBSD|Darwin)
echo "-- FreeBSD/NetBSD/Darwin [MacOS X] --"
- ifconfig -a | egrep "(flags=|inet)"
- netstat -rn | awk '$3 !~ /^UHL/ { print $1,$2,$3,$NF }'
+ @IFCONFIG@ -a | egrep "(flags=|inet)"
+ @NETSTAT@ -rn | awk '$3 !~ /^UHL/ { print $1,$2,$3,$NF }'
return
;;
OpenBSD)
echo "-- OpenBSD --"
- ifconfig -a | egrep "(flags=|inet)" | \
+ @IFCONFIG@ -a | egrep "(flags=|inet)" | \
sed -e 's/pltime [0-9]*//' -e 's/vltime [0-9]*//'
- netstat -rn | awk '$3 !~ /^UHL/ { print $1,$2,$3,$NF }'
+ @NETSTAT@ -rn | awk '$3 !~ /^UHL/ { print $1,$2,$3,$NF }'
return
;;
SunOS)
echo "-- Solaris --"
- ifconfig -a | egrep "(flags=|inet)"
- netstat -rn
+ @IFCONFIG@ -a | egrep "(flags=|inet)"
+ @NETSTAT@ -rn | awk '$3 !~ /^UHL/ { print $1,$2,$3,$6 }'
return
;;
esac