diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-10-18 09:42:34 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-10-18 09:42:34 +0000 |
commit | 50f76ab44c5cb28c0aa92a2a54f50d9ba10a46ee (patch) | |
tree | 43fd03278cc142372846018d43f0cb80ef37550c /src/dns/test_gnunet_dns.sh | |
parent | edbebab8a0ec393c3132edc78399c9951e123fdf (diff) | |
download | gnunet-50f76ab44c5cb28c0aa92a2a54f50d9ba10a46ee.tar.gz gnunet-50f76ab44c5cb28c0aa92a2a54f50d9ba10a46ee.zip |
-misc bugfixes
Diffstat (limited to 'src/dns/test_gnunet_dns.sh')
-rwxr-xr-x | src/dns/test_gnunet_dns.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/dns/test_gnunet_dns.sh b/src/dns/test_gnunet_dns.sh index 35585d46e..c60b94c19 100755 --- a/src/dns/test_gnunet_dns.sh +++ b/src/dns/test_gnunet_dns.sh | |||
@@ -10,9 +10,15 @@ export PATH=".:$PATH" | |||
10 | gnunet-service-dns -c dns.conf & | 10 | gnunet-service-dns -c dns.conf & |
11 | gnunet-dns-redirector -c dns.conf -4 127.0.0.1 & | 11 | gnunet-dns-redirector -c dns.conf -4 127.0.0.1 & |
12 | sleep 1 | 12 | sleep 1 |
13 | LO=`nslookup gnunet.org | grep Address | tail -n1` | 13 | # need to run 'nslookup' as 'nobody', as gnunet-service-dns runs as root |
14 | # and thus 'root' is excepted from DNS interception! | ||
15 | LO=`sudo -u nobody nslookup gnunet.org | grep Address | tail -n1` | ||
14 | if [ "$LO" != "Address: 127.0.0.1" ] | 16 | if [ "$LO" != "Address: 127.0.0.1" ] |
15 | then | 17 | then |
16 | echo "Fail: $LO" | 18 | echo "Fail: got address $LO, wanted 127.0.0.1" |
19 | ret=1 | ||
20 | else | ||
21 | ret=0 | ||
17 | fi | 22 | fi |
18 | kill `jobs -p` | 23 | kill `jobs -p` |
24 | exit $ret | ||