aboutsummaryrefslogtreecommitdiff
path: root/src/dns/test_gnunet_dns.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/dns/test_gnunet_dns.sh')
-rwxr-xr-xsrc/dns/test_gnunet_dns.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/dns/test_gnunet_dns.sh b/src/dns/test_gnunet_dns.sh
index 57b9716f5..0fa338c9b 100755
--- a/src/dns/test_gnunet_dns.sh
+++ b/src/dns/test_gnunet_dns.sh
@@ -1,4 +1,4 @@
1#!/bin/bash 1#!/bin/sh
2 2
3ME=`whoami` 3ME=`whoami`
4if [ "$ME" != "root" ] 4if [ "$ME" != "root" ]
@@ -26,12 +26,17 @@ then
26 echo "This test requires nslookup. Skipping." 26 echo "This test requires nslookup. Skipping."
27 exit 77 27 exit 77
28fi 28fi
29if ! iptables -t mangle --list &> /dev/null 29if [ ! -x `which iptables` ]
30then
31 echo "This test requires iptables. Skipping."
32 exit 77
33fi
34if ! iptables -t mangle --list > /dev/null 2>&1
30then 35then
31 echo "This test requires iptables with 'mangle' support. Skipping." 36 echo "This test requires iptables with 'mangle' support. Skipping."
32 exit 77 37 exit 77
33fi 38fi
34if grep % /etc/resolv.conf &> /dev/null 39if grep % /etc/resolv.conf > /dev/null 2>&1
35then 40then
36 echo "This system seems to use a DNS server on an IPv6 link-local address, which is not supported. Skipping." 41 echo "This system seems to use a DNS server on an IPv6 link-local address, which is not supported. Skipping."
37 exit 77 42 exit 77
@@ -52,5 +57,6 @@ else
52 echo "Test run, with success." 57 echo "Test run, with success."
53 ret=0 58 ret=0
54fi 59fi
60# TODO: jobs is a possible bashism. Fix.
55kill `jobs -p` 61kill `jobs -p`
56exit $ret 62exit $ret