aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-03-09 11:59:23 +0000
committerng0 <ng0@n0.is>2019-03-09 11:59:23 +0000
commitbbe61e6019a4d0a213e42a80d37638e13759bba3 (patch)
tree68e97d43e1407dd73e25551336e71bccae979895 /src
parentf7aa05c490d2027225e99a6d5f5bf920e76bf5ed (diff)
downloadgnunet-bbe61e6019a4d0a213e42a80d37638e13759bba3.tar.gz
gnunet-bbe61e6019a4d0a213e42a80d37638e13759bba3.zip
bashism
Diffstat (limited to 'src')
-rwxr-xr-xsrc/gns/test_gns_gns2dns_lookup.sh14
-rwxr-xr-xsrc/gns/test_gns_ipv6_lookup.sh6
-rwxr-xr-xsrc/gns/test_gns_lookup.sh6
-rwxr-xr-xsrc/gns/test_gns_mx_lookup.sh6
-rwxr-xr-xsrc/gns/test_gns_quickupdate.sh6
-rwxr-xr-xsrc/gns/test_gns_rel_expiration.sh8
-rwxr-xr-xsrc/gns/test_gns_revocation.sh6
-rwxr-xr-xsrc/gns/test_gns_soa_lookup.sh8
-rwxr-xr-xsrc/gns/test_gns_txt_lookup.sh6
9 files changed, 33 insertions, 33 deletions
diff --git a/src/gns/test_gns_gns2dns_lookup.sh b/src/gns/test_gns_gns2dns_lookup.sh
index 24fb36b9d..22caa68ff 100755
--- a/src/gns/test_gns_gns2dns_lookup.sh
+++ b/src/gns/test_gns_gns2dns_lookup.sh
@@ -1,4 +1,4 @@
1#!/bin/bash 1#!/bin/sh
2trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT 2trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT
3 3
4LOCATION=$(which gnunet-config) 4LOCATION=$(which gnunet-config)
@@ -26,7 +26,7 @@ TEST_IP_GNS2DNS="8.8.8.8"
26# main label used during resolution 26# main label used during resolution
27TEST_RECORD_NAME="homepage" 27TEST_RECORD_NAME="homepage"
28 28
29if ! nslookup gnunet.org $TEST_IP_GNS2DNS &> /dev/null 29if ! nslookup gnunet.org $TEST_IP_GNS2DNS > /dev/null 2>&1
30then 30then
31 echo "Cannot reach DNS, skipping test" 31 echo "Cannot reach DNS, skipping test"
32 exit 77 32 exit 77
@@ -44,7 +44,7 @@ TEST_DOMAIN="www.${TEST_RECORD_NAME}.$MY_EGO"
44TEST_DOMAIN_ALT="${TEST_RECORD_NAME}.$MY_EGO" 44TEST_DOMAIN_ALT="${TEST_RECORD_NAME}.$MY_EGO"
45TEST_DOMAIN_ALT2="docs.${TEST_RECORD_NAME}.$MY_EGO" 45TEST_DOMAIN_ALT2="docs.${TEST_RECORD_NAME}.$MY_EGO"
46 46
47which timeout &> /dev/null && DO_TIMEOUT="timeout 15" 47which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 15"
48 48
49 49
50gnunet-arm -s -c test_gns_lookup.conf 50gnunet-arm -s -c test_gns_lookup.conf
@@ -83,7 +83,7 @@ gnunet-arm -e -c test_gns_lookup.conf
83rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` 83rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME`
84 84
85ret=0 85ret=0
86if [ "$RES_IP" == "$TEST_IP" ] 86if [ "$RES_IP" = "$TEST_IP" ]
87then 87then
88 echo "PASS: Resolved $TEST_DOMAIN to $RES_IP." 88 echo "PASS: Resolved $TEST_DOMAIN to $RES_IP."
89else 89else
@@ -91,7 +91,7 @@ else
91 ret=1 91 ret=1
92fi 92fi
93 93
94if [ "$RES_IP6" == "$TEST_IP6" ] 94if [ "$RES_IP6" = "$TEST_IP6" ]
95then 95then
96 echo "PASS: Resolved $TEST_DOMAIN to $RES_IP6." 96 echo "PASS: Resolved $TEST_DOMAIN to $RES_IP6."
97else 97else
@@ -99,7 +99,7 @@ else
99 ret=1 99 ret=1
100fi 100fi
101 101
102if [ "$RES_IP_ALT" == "$TEST_IP" ] 102if [ "$RES_IP_ALT" = "$TEST_IP" ]
103then 103then
104 echo "PASS: Resolved $TEST_DOMAIN_ALT to $RES_IP_ALT." 104 echo "PASS: Resolved $TEST_DOMAIN_ALT to $RES_IP_ALT."
105else 105else
@@ -107,7 +107,7 @@ else
107 ret=1 107 ret=1
108fi 108fi
109 109
110if [ "$RES_IP_ALT2" == "$TEST_IP_ALT2" ] 110if [ "$RES_IP_ALT2" = "$TEST_IP_ALT2" ]
111then 111then
112 echo "PASS: Resolved $TEST_DOMAIN_ALT2 to $RES_IP_ALT2." 112 echo "PASS: Resolved $TEST_DOMAIN_ALT2 to $RES_IP_ALT2."
113else 113else
diff --git a/src/gns/test_gns_ipv6_lookup.sh b/src/gns/test_gns_ipv6_lookup.sh
index 72da5ee2c..5dbb34a2c 100755
--- a/src/gns/test_gns_ipv6_lookup.sh
+++ b/src/gns/test_gns_ipv6_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
@@ -16,7 +16,7 @@ fi
16MY_EGO="myego" 16MY_EGO="myego"
17 17
18rm -rf `gnunet-config -c test_gns_lookup.conf -s PATHS -o GNUNET_HOME -f` 18rm -rf `gnunet-config -c test_gns_lookup.conf -s PATHS -o GNUNET_HOME -f`
19which timeout &> /dev/null && DO_TIMEOUT="timeout 30" 19which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30"
20TEST_IP="dead::beef" 20TEST_IP="dead::beef"
21gnunet-arm -s -c test_gns_lookup.conf 21gnunet-arm -s -c test_gns_lookup.conf
22gnunet-identity -C $MY_EGO -c test_gns_lookup.conf 22gnunet-identity -C $MY_EGO -c test_gns_lookup.conf
@@ -27,7 +27,7 @@ gnunet-identity -D $MY_EGO -c test_gns_lookup.conf
27gnunet-arm -e -c test_gns_lookup.conf 27gnunet-arm -e -c test_gns_lookup.conf
28rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` 28rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME`
29 29
30if [ "$RES_IP" == "$TEST_IP" ] 30if [ "$RES_IP" = "$TEST_IP" ]
31then 31then
32 exit 0 32 exit 0
33else 33else
diff --git a/src/gns/test_gns_lookup.sh b/src/gns/test_gns_lookup.sh
index 2dffa1251..4bd6ae879 100755
--- a/src/gns/test_gns_lookup.sh
+++ b/src/gns/test_gns_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
@@ -15,7 +15,7 @@ then
15fi 15fi
16 16
17rm -rf `gnunet-config -c test_gns_lookup.conf -s PATHS -o GNUNET_HOME -f` 17rm -rf `gnunet-config -c test_gns_lookup.conf -s PATHS -o GNUNET_HOME -f`
18which timeout &> /dev/null && DO_TIMEOUT="timeout 30" 18which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30"
19TEST_IP="127.0.0.1" 19TEST_IP="127.0.0.1"
20MY_EGO="myego" 20MY_EGO="myego"
21LABEL="www" 21LABEL="www"
@@ -27,7 +27,7 @@ gnunet-namestore -z $MY_EGO -d -n $LABEL -t A -V $TEST_IP -e never -c test_gns_l
27gnunet-identity -D $MY_EGO -c test_gns_lookup.conf 27gnunet-identity -D $MY_EGO -c test_gns_lookup.conf
28gnunet-arm -e -c test_gns_lookup.conf 28gnunet-arm -e -c test_gns_lookup.conf
29 29
30if [ "$RES_IP" == "$TEST_IP" ] 30if [ "$RES_IP" = "$TEST_IP" ]
31then 31then
32 exit 0 32 exit 0
33else 33else
diff --git a/src/gns/test_gns_mx_lookup.sh b/src/gns/test_gns_mx_lookup.sh
index 79ac37b0a..4e9d98358 100755
--- a/src/gns/test_gns_mx_lookup.sh
+++ b/src/gns/test_gns_mx_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
@@ -15,7 +15,7 @@ then
15fi 15fi
16 16
17rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` 17rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME`
18which timeout &> /dev/null && DO_TIMEOUT="timeout 5" 18which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 5"
19 19
20MY_EGO="myego" 20MY_EGO="myego"
21TEST_MX="5,mail.+" 21TEST_MX="5,mail.+"
@@ -35,7 +35,7 @@ rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME`
35RES_MX=`echo $RES_MX | tr [A-Z] [a-z]` 35RES_MX=`echo $RES_MX | tr [A-Z] [a-z]`
36WANT_MX=`echo $WANT_MX | tr [A-Z] [a-z]` 36WANT_MX=`echo $WANT_MX | tr [A-Z] [a-z]`
37 37
38if [ "$RES_MX" == "$WANT_MX" ] 38if [ "$RES_MX" = "$WANT_MX" ]
39then 39then
40 exit 0 40 exit 0
41else 41else
diff --git a/src/gns/test_gns_quickupdate.sh b/src/gns/test_gns_quickupdate.sh
index d9807fe22..d2b4bf2cb 100755
--- a/src/gns/test_gns_quickupdate.sh
+++ b/src/gns/test_gns_quickupdate.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
@@ -19,7 +19,7 @@ OTHER_EGO="delegatedego"
19 19
20 20
21rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` 21rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME`
22which timeout &> /dev/null && DO_TIMEOUT="timeout 5" 22which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 5"
23TEST_IP="127.0.0.1" 23TEST_IP="127.0.0.1"
24gnunet-arm -s -c test_gns_lookup.conf 24gnunet-arm -s -c test_gns_lookup.conf
25gnunet-identity -C $MY_EGO -c test_gns_lookup.conf 25gnunet-identity -C $MY_EGO -c test_gns_lookup.conf
@@ -56,7 +56,7 @@ gnunet-identity -D $OTHER_EGO -c test_gns_lookup.conf
56gnunet-arm -e -c test_gns_lookup.conf 56gnunet-arm -e -c test_gns_lookup.conf
57rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` 57rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME`
58 58
59if [ "$RES_IP" == "$TEST_IP" ] 59if [ "$RES_IP" = "$TEST_IP" ]
60then 60then
61 exit 0 61 exit 0
62else 62else
diff --git a/src/gns/test_gns_rel_expiration.sh b/src/gns/test_gns_rel_expiration.sh
index c7c66bc27..993c2131e 100755
--- a/src/gns/test_gns_rel_expiration.sh
+++ b/src/gns/test_gns_rel_expiration.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 @@ MY_EGO="myego"
25OTHER_EGO="delegatedego" 25OTHER_EGO="delegatedego"
26 26
27rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` 27rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME`
28which timeout &> /dev/null && DO_TIMEOUT="timeout 5" 28which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 5"
29TEST_IP="127.0.0.1" 29TEST_IP="127.0.0.1"
30gnunet-arm -s -c test_gns_lookup.conf 30gnunet-arm -s -c test_gns_lookup.conf
31gnunet-identity -C $MY_EGO -c test_gns_lookup.conf 31gnunet-identity -C $MY_EGO -c test_gns_lookup.conf
@@ -48,13 +48,13 @@ gnunet-identity -D $OTHER_EGO -c test_gns_lookup.conf
48gnunet-arm -e -c test_gns_lookup.conf 48gnunet-arm -e -c test_gns_lookup.conf
49rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` 49rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME`
50 50
51if [ "$RES_IP_EXP" == "$TEST_IP" ] 51if [ "$RES_IP_EXP" = "$TEST_IP" ]
52then 52then
53 echo "Failed to properly expire IP, got $RES_IP_EXP." 53 echo "Failed to properly expire IP, got $RES_IP_EXP."
54 exit 1 54 exit 1
55fi 55fi
56 56
57if [ "$RES_IP" == "$TEST_IP" ] 57if [ "$RES_IP" = "$TEST_IP" ]
58then 58then
59 exit 0 59 exit 0
60else 60else
diff --git a/src/gns/test_gns_revocation.sh b/src/gns/test_gns_revocation.sh
index 08a0f8ac1..3c0cf02fb 100755
--- a/src/gns/test_gns_revocation.sh
+++ b/src/gns/test_gns_revocation.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 ]
@@ -40,7 +40,7 @@ then
40 exit 1 40 exit 1
41fi 41fi
42 42
43if [ "x$RES_IP_REV" == "x" ] 43if [ "x$RES_IP_REV" = "x" ]
44then 44then
45 exit 0 45 exit 0
46else 46else
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`
diff --git a/src/gns/test_gns_txt_lookup.sh b/src/gns/test_gns_txt_lookup.sh
index 6c6b4b3f6..b0c9144c2 100755
--- a/src/gns/test_gns_txt_lookup.sh
+++ b/src/gns/test_gns_txt_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
@@ -15,7 +15,7 @@ then
15fi 15fi
16 16
17rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` 17rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME`
18which timeout &> /dev/null && DO_TIMEOUT="timeout 30" 18which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30"
19TEST_TXT="GNS powered txt record data" 19TEST_TXT="GNS powered txt record data"
20MY_EGO="myego" 20MY_EGO="myego"
21LABEL="testtxt" 21LABEL="testtxt"
@@ -28,7 +28,7 @@ gnunet-identity -D $MY_EGO -c test_gns_lookup.conf
28gnunet-arm -e -c test_gns_lookup.conf 28gnunet-arm -e -c test_gns_lookup.conf
29rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` 29rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME`
30 30
31if [ "$RES_TXT" == "$TEST_TXT" ] 31if [ "$RES_TXT" = "$TEST_TXT" ]
32then 32then
33 exit 0 33 exit 0
34else 34else