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/test_gns_cname_lookup.sh | |
parent | 9e3255786c36e163ea25e44cbacf1409c843ced1 (diff) | |
download | gnunet-47d973e97236d93c90d8f2fb49ccb46164e03e24.tar.gz gnunet-47d973e97236d93c90d8f2fb49ccb46164e03e24.zip |
bashism
Diffstat (limited to 'src/gns/test_gns_cname_lookup.sh')
-rwxr-xr-x | src/gns/test_gns_cname_lookup.sh | 12 |
1 files changed, 6 insertions, 6 deletions
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 |