diff options
Diffstat (limited to 'src/dns/test_gnunet_dns.sh')
-rwxr-xr-x | src/dns/test_gnunet_dns.sh | 12 |
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 | ||
3 | ME=`whoami` | 3 | ME=`whoami` |
4 | if [ "$ME" != "root" ] | 4 | if [ "$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 |
28 | fi | 28 | fi |
29 | if ! iptables -t mangle --list &> /dev/null | 29 | if [ ! -x `which iptables` ] |
30 | then | ||
31 | echo "This test requires iptables. Skipping." | ||
32 | exit 77 | ||
33 | fi | ||
34 | if ! iptables -t mangle --list > /dev/null 2>&1 | ||
30 | then | 35 | then |
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 |
33 | fi | 38 | fi |
34 | if grep % /etc/resolv.conf &> /dev/null | 39 | if grep % /etc/resolv.conf > /dev/null 2>&1 |
35 | then | 40 | then |
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 |
54 | fi | 59 | fi |
60 | # TODO: jobs is a possible bashism. Fix. | ||
55 | kill `jobs -p` | 61 | kill `jobs -p` |
56 | exit $ret | 62 | exit $ret |