aboutsummaryrefslogtreecommitdiff
path: root/src/gns/test_gns_soa_lookup.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/gns/test_gns_soa_lookup.sh')
-rwxr-xr-xsrc/gns/test_gns_soa_lookup.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gns/test_gns_soa_lookup.sh b/src/gns/test_gns_soa_lookup.sh
index 6a09ac8c7..c5b049b72 100755
--- a/src/gns/test_gns_soa_lookup.sh
+++ b/src/gns/test_gns_soa_lookup.sh
@@ -1,4 +1,4 @@
1#!/bin/bash 1#!/bin/sh
2# This file is in the public domain. 2# This file is in the public domain.
3trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT 3trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT
4 4
@@ -14,7 +14,7 @@ then
14 exit 77 14 exit 77
15fi 15fi
16 16
17which timeout &> /dev/null && DO_TIMEOUT="timeout 5" 17which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 5"
18 18
19rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` 19rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME`
20MY_EGO="myego" 20MY_EGO="myego"
@@ -24,7 +24,7 @@ TEST_IP_GNS2DNS="184.172.157.218"
24TEST_RECORD_NAME="homepage" 24TEST_RECORD_NAME="homepage"
25TEST_RECORD_GNS2DNS="gnunet.org" 25TEST_RECORD_GNS2DNS="gnunet.org"
26 26
27if ! nslookup $TEST_RECORD_GNS2DNS $TEST_IP_GNS2DNS &> /dev/null 27if ! nslookup $TEST_RECORD_GNS2DNS $TEST_IP_GNS2DNS > /dev/null 2>&1
28then 28then
29 echo "Cannot reach DNS, skipping test" 29 echo "Cannot reach DNS, skipping test"
30 exit 77 30 exit 77
@@ -34,7 +34,7 @@ gnunet-arm -s -c test_gns_lookup.conf
34gnunet-identity -C $MY_EGO -c test_gns_lookup.conf 34gnunet-identity -C $MY_EGO -c test_gns_lookup.conf
35gnunet-namestore -p -z $MY_EGO -a -n $TEST_RECORD_NAME -t GNS2DNS -V ${TEST_RECORD_GNS2DNS}@${TEST_IP_GNS2DNS} -e never -c test_gns_lookup.conf 35gnunet-namestore -p -z $MY_EGO -a -n $TEST_RECORD_NAME -t GNS2DNS -V ${TEST_RECORD_GNS2DNS}@${TEST_IP_GNS2DNS} -e never -c test_gns_lookup.conf
36RES_SOA=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN -t SOA -c test_gns_lookup.conf` 36RES_SOA=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN -t SOA -c test_gns_lookup.conf`
37gnunet-namestore -z $MY_EGO -d -n $TEST_RECORD_NAME -t GNS2DNS -V ${TEST_RECORD_GNS2DNS}@${TEST_IP_GNS2DNS} -e never -c test_gns_lookup.conf &> /dev/null 37gnunet-namestore -z $MY_EGO -d -n $TEST_RECORD_NAME -t GNS2DNS -V ${TEST_RECORD_GNS2DNS}@${TEST_IP_GNS2DNS} -e never -c test_gns_lookup.conf > /dev/null 2>&1
38gnunet-identity -D $MY_EGO -c test_gns_lookup.conf 38gnunet-identity -D $MY_EGO -c test_gns_lookup.conf
39gnunet-arm -e -c test_gns_lookup.conf 39gnunet-arm -e -c test_gns_lookup.conf
40rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` 40rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME`