diff options
author | ng0 <ng0@n0.is> | 2019-03-09 11:54:36 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-03-09 11:54:36 +0000 |
commit | 47d973e97236d93c90d8f2fb49ccb46164e03e24 (patch) | |
tree | 67d67db8c8fa87f6a1a47698734fa7dafc1927cf /src/gns | |
parent | 9e3255786c36e163ea25e44cbacf1409c843ced1 (diff) | |
download | gnunet-47d973e97236d93c90d8f2fb49ccb46164e03e24.tar.gz gnunet-47d973e97236d93c90d8f2fb49ccb46164e03e24.zip |
bashism
Diffstat (limited to 'src/gns')
-rwxr-xr-x | src/gns/test_gns_at_lookup.sh | 6 | ||||
-rwxr-xr-x | src/gns/test_gns_cname_lookup.sh | 12 | ||||
-rwxr-xr-x | src/gns/test_gns_config_lookup.sh | 6 |
3 files changed, 12 insertions, 12 deletions
diff --git a/src/gns/test_gns_at_lookup.sh b/src/gns/test_gns_at_lookup.sh index d900c070b..bacc63eb0 100755 --- a/src/gns/test_gns_at_lookup.sh +++ b/src/gns/test_gns_at_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. |
3 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT | 3 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT |
4 | 4 | ||
@@ -14,7 +14,7 @@ then | |||
14 | exit 77 | 14 | exit 77 |
15 | fi | 15 | fi |
16 | 16 | ||
17 | which timeout &> /dev/null && DO_TIMEOUT="timeout 5" | 17 | which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 5" |
18 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` | 18 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` |
19 | 19 | ||
20 | TEST_IP="127.0.0.1" | 20 | TEST_IP="127.0.0.1" |
@@ -31,7 +31,7 @@ gnunet-namestore -z delegatedego -d -n '@' -t A -V $TEST_IP -e never -c test_gn | |||
31 | gnunet-arm -e -c test_gns_lookup.conf | 31 | gnunet-arm -e -c test_gns_lookup.conf |
32 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` | 32 | rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` |
33 | 33 | ||
34 | if [ "$RES_IP" == "$TEST_IP" ] | 34 | if [ "$RES_IP" = "$TEST_IP" ] |
35 | then | 35 | then |
36 | exit 0 | 36 | exit 0 |
37 | else | 37 | else |
diff --git a/src/gns/test_gns_cname_lookup.sh b/src/gns/test_gns_cname_lookup.sh index de575c561..d97a4fe5e 100755 --- a/src/gns/test_gns_cname_lookup.sh +++ b/src/gns/test_gns_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. |
3 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT | 3 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT |
4 | 4 | ||
@@ -16,7 +16,7 @@ fi | |||
16 | 16 | ||
17 | # permissive DNS resolver we will use for the test | 17 | # permissive DNS resolver we will use for the test |
18 | DNS_RESOLVER="8.8.8.8" | 18 | DNS_RESOLVER="8.8.8.8" |
19 | if ! nslookup gnunet.org $DNS_RESOLVER &> /dev/null | 19 | if ! nslookup gnunet.org $DNS_RESOLVER > /dev/null 2>&1 |
20 | then | 20 | then |
21 | echo "Cannot reach DNS, skipping test" | 21 | echo "Cannot reach DNS, skipping test" |
22 | exit 77 | 22 | exit 77 |
@@ -36,7 +36,7 @@ TEST_RECORD_NAME_DNS="www3" | |||
36 | MY_EGO="myego" | 36 | MY_EGO="myego" |
37 | TEST_DOMAIN_PLUS="www.$MY_EGO" | 37 | TEST_DOMAIN_PLUS="www.$MY_EGO" |
38 | TEST_DOMAIN_DNS="www3.$MY_EGO" | 38 | TEST_DOMAIN_DNS="www3.$MY_EGO" |
39 | which timeout &> /dev/null && DO_TIMEOUT="timeout 15" | 39 | which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 15" |
40 | 40 | ||
41 | gnunet-arm -s -c test_gns_lookup.conf | 41 | gnunet-arm -s -c test_gns_lookup.conf |
42 | gnunet-identity -C $MY_EGO -c test_gns_lookup.conf | 42 | gnunet-identity -C $MY_EGO -c test_gns_lookup.conf |
@@ -57,7 +57,7 @@ rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` | |||
57 | # make cmp case-insensitive by converting to lower case first | 57 | # make cmp case-insensitive by converting to lower case first |
58 | RES_CNAME_RAW=`echo $RES_CNAME_RAW | tr [A-Z] [a-z]` | 58 | RES_CNAME_RAW=`echo $RES_CNAME_RAW | tr [A-Z] [a-z]` |
59 | TESTEGOZONE=`echo $TESTEGOZONE | tr [A-Z] [a-z]` | 59 | TESTEGOZONE=`echo $TESTEGOZONE | tr [A-Z] [a-z]` |
60 | if [ "$RES_CNAME_RAW" == "server.$TESTEGOZONE" ] | 60 | if [ "$RES_CNAME_RAW" = "server.$TESTEGOZONE" ] |
61 | then | 61 | then |
62 | echo "PASS: CNAME resolution from GNS" | 62 | echo "PASS: CNAME resolution from GNS" |
63 | else | 63 | else |
@@ -65,7 +65,7 @@ else | |||
65 | exit 1 | 65 | exit 1 |
66 | fi | 66 | fi |
67 | 67 | ||
68 | if [ "$RES_CNAME" == "$TEST_IP_PLUS" ] | 68 | if [ "$RES_CNAME" = "$TEST_IP_PLUS" ] |
69 | then | 69 | then |
70 | echo "PASS: IP resolution from GNS" | 70 | echo "PASS: IP resolution from GNS" |
71 | else | 71 | else |
@@ -73,7 +73,7 @@ else | |||
73 | exit 1 | 73 | exit 1 |
74 | fi | 74 | fi |
75 | 75 | ||
76 | if [ "$RES_CNAME_DNS" == "$TEST_IP_DNS" ] | 76 | if [ "$RES_CNAME_DNS" = "$TEST_IP_DNS" ] |
77 | then | 77 | then |
78 | echo "PASS: IP resolution from DNS" | 78 | echo "PASS: IP resolution from DNS" |
79 | exit 0 | 79 | exit 0 |
diff --git a/src/gns/test_gns_config_lookup.sh b/src/gns/test_gns_config_lookup.sh index 35d7c32d9..1c5a62b01 100755 --- a/src/gns/test_gns_config_lookup.sh +++ b/src/gns/test_gns_config_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. |
3 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT | 3 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT |
4 | 4 | ||
@@ -18,7 +18,7 @@ MY_EGO="myego" | |||
18 | rm -rf `gnunet-config -c test_gns_lookup.conf -s PATHS -o GNUNET_HOME -f` | 18 | rm -rf `gnunet-config -c test_gns_lookup.conf -s PATHS -o GNUNET_HOME -f` |
19 | CFG=`mktemp --tmpdir=$PWD` | 19 | CFG=`mktemp --tmpdir=$PWD` |
20 | cp test_gns_lookup.conf $CFG || exit 77 | 20 | cp test_gns_lookup.conf $CFG || exit 77 |
21 | which timeout &> /dev/null && DO_TIMEOUT="timeout 5" | 21 | which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 5" |
22 | TEST_IP="dead::beef" | 22 | TEST_IP="dead::beef" |
23 | gnunet-arm -s -c $CFG || exit 77 | 23 | gnunet-arm -s -c $CFG || exit 77 |
24 | gnunet-identity -C $MY_EGO -c $CFG | 24 | gnunet-identity -C $MY_EGO -c $CFG |
@@ -35,7 +35,7 @@ gnunet-arm -e -c $CFG | |||
35 | rm -rf `gnunet-config -c $CFG -f -s paths -o GNUNET_TEST_HOME` | 35 | rm -rf `gnunet-config -c $CFG -f -s paths -o GNUNET_TEST_HOME` |
36 | rm $CFG | 36 | rm $CFG |
37 | 37 | ||
38 | if [ "$RES_IP" == "$TEST_IP" ] | 38 | if [ "$RES_IP" = "$TEST_IP" ] |
39 | then | 39 | then |
40 | exit 0 | 40 | exit 0 |
41 | else | 41 | else |