aboutsummaryrefslogtreecommitdiff
path: root/src/gns
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-03-09 11:56:13 +0000
committerng0 <ng0@n0.is>2019-03-09 11:56:13 +0000
commitf7aa05c490d2027225e99a6d5f5bf920e76bf5ed (patch)
treed74ff993beec74e30050de696d0d5e797e88b0fb /src/gns
parent47d973e97236d93c90d8f2fb49ccb46164e03e24 (diff)
downloadgnunet-f7aa05c490d2027225e99a6d5f5bf920e76bf5ed.tar.gz
gnunet-f7aa05c490d2027225e99a6d5f5bf920e76bf5ed.zip
bashism
Diffstat (limited to 'src/gns')
-rwxr-xr-xsrc/gns/test_gns_delegated_lookup.sh6
-rwxr-xr-xsrc/gns/test_gns_dht_lookup.sh6
-rwxr-xr-xsrc/gns/test_gns_gns2dns_cname_lookup.sh10
-rwxr-xr-xsrc/gns/test_gns_zkey_lookup.sh6
4 files changed, 14 insertions, 14 deletions
diff --git a/src/gns/test_gns_delegated_lookup.sh b/src/gns/test_gns_delegated_lookup.sh
index 21774ad8d..af9994b34 100755
--- a/src/gns/test_gns_delegated_lookup.sh
+++ b/src/gns/test_gns_delegated_lookup.sh
@@ -1,7 +1,7 @@
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
4which timeout &> /dev/null && DO_TIMEOUT="timeout 30" 4which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30"
5 5
6LOCATION=$(which gnunet-config) 6LOCATION=$(which gnunet-config)
7if [ -z $LOCATION ] 7if [ -z $LOCATION ]
@@ -35,7 +35,7 @@ gnunet-arm -e -c test_gns_lookup.conf
35 35
36rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` 36rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME`
37 37
38if [ "$RES_IP" == "$TEST_IP" ] 38if [ "$RES_IP" = "$TEST_IP" ]
39then 39then
40 exit 0 40 exit 0
41else 41else
diff --git a/src/gns/test_gns_dht_lookup.sh b/src/gns/test_gns_dht_lookup.sh
index 07e559752..ac90d58a8 100755
--- a/src/gns/test_gns_dht_lookup.sh
+++ b/src/gns/test_gns_dht_lookup.sh
@@ -1,7 +1,7 @@
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
4which timeout &> /dev/null && DO_TIMEOUT="timeout 30" 4which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30"
5 5
6LOCATION=$(which gnunet-config) 6LOCATION=$(which gnunet-config)
7if [ -z $LOCATION ] 7if [ -z $LOCATION ]
@@ -55,7 +55,7 @@ then
55 echo "Failed to resolve to proper IP, got $RES_IP_REL. (relative expiration)" 55 echo "Failed to resolve to proper IP, got $RES_IP_REL. (relative expiration)"
56 #exit 1 56 #exit 1
57fi 57fi
58if [ "$RES_IP" == "$TEST_IP" ] 58if [ "$RES_IP" = "$TEST_IP" ]
59then 59then
60 exit 0 60 exit 0
61else 61else
diff --git a/src/gns/test_gns_gns2dns_cname_lookup.sh b/src/gns/test_gns_gns2dns_cname_lookup.sh
index c07905d83..fbc1dd7ee 100755
--- a/src/gns/test_gns_gns2dns_cname_lookup.sh
+++ b/src/gns/test_gns_gns2dns_cname_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
@@ -25,7 +25,7 @@ TEST_RECORD_NAME="homepage"
25 25
26XNS=ns.joker.com 26XNS=ns.joker.com
27 27
28if ! nslookup gnunet.org a.$XNS &> /dev/null 28if ! nslookup gnunet.org a.$XNS > /dev/null 2>&1
29then 29then
30 echo "Cannot reach DNS, skipping test" 30 echo "Cannot reach DNS, skipping test"
31 exit 77 31 exit 77
@@ -43,7 +43,7 @@ MY_EGO="myego"
43# various names we will use for resolution 43# various names we will use for resolution
44TEST_DOMAIN="www.${TEST_RECORD_NAME}.$MY_EGO" 44TEST_DOMAIN="www.${TEST_RECORD_NAME}.$MY_EGO"
45 45
46which timeout &> /dev/null && DO_TIMEOUT="timeout 15" 46which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 15"
47 47
48gnunet-arm -s -c test_gns_lookup.conf 48gnunet-arm -s -c test_gns_lookup.conf
49OUT=`$DO_TIMEOUT gnunet-resolver -c test_gns_lookup.conf gnunet.org` 49OUT=`$DO_TIMEOUT gnunet-resolver -c test_gns_lookup.conf gnunet.org`
@@ -77,7 +77,7 @@ gnunet-arm -e -c test_gns_lookup.conf
77rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` 77rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME`
78 78
79ret=0 79ret=0
80if [ "$RES_IP" == "$TEST_IP" ] 80if [ "$RES_IP" = "$TEST_IP" ]
81then 81then
82 echo "PASS: Resolved $TEST_DOMAIN to $RES_IP." 82 echo "PASS: Resolved $TEST_DOMAIN to $RES_IP."
83else 83else
@@ -85,7 +85,7 @@ else
85 ret=1 85 ret=1
86fi 86fi
87 87
88if [ "$RES_IP6" == "$TEST_IP6" ] 88if [ "$RES_IP6" = "$TEST_IP6" ]
89then 89then
90 echo "PASS: Resolved $TEST_DOMAIN to $RES_IP6." 90 echo "PASS: Resolved $TEST_DOMAIN to $RES_IP6."
91else 91else
diff --git a/src/gns/test_gns_zkey_lookup.sh b/src/gns/test_gns_zkey_lookup.sh
index b36a16fa2..03118d741 100755
--- a/src/gns/test_gns_zkey_lookup.sh
+++ b/src/gns/test_gns_zkey_lookup.sh
@@ -1,7 +1,7 @@
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
4which timeout &> /dev/null && DO_TIMEOUT="timeout 5" 4which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 5"
5 5
6LOCATION=$(which gnunet-config) 6LOCATION=$(which gnunet-config)
7if [ -z $LOCATION ] 7if [ -z $LOCATION ]
@@ -30,7 +30,7 @@ gnunet-namestore -z delegatedego -d -n www -t A -V $TEST_IP -e never -c test_gn
30gnunet-arm -e -c test_gns_lookup.conf 30gnunet-arm -e -c test_gns_lookup.conf
31rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` 31rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME`
32 32
33if [ "$RES_IP" == "$TEST_IP" ] 33if [ "$RES_IP" = "$TEST_IP" ]
34then 34then
35 exit 0 35 exit 0
36else 36else