diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2013-09-25 12:16:42 +0000 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2013-09-25 12:16:42 +0000 |
commit | 57a1b85dce167d740f50f3078e47d5a1ac51e5d8 (patch) | |
tree | f44c068dc46f14309ca5df7bf05bad12f669e9ca /src/gns/test_gns_mx_lookup.sh | |
parent | 8f726e5bef26c07b394718e28afbb67309a6a1f9 (diff) | |
download | gnunet-57a1b85dce167d740f50f3078e47d5a1ac51e5d8.tar.gz gnunet-57a1b85dce167d740f50f3078e47d5a1ac51e5d8.zip |
-mx test, mx type not recognized
Diffstat (limited to 'src/gns/test_gns_mx_lookup.sh')
-rwxr-xr-x | src/gns/test_gns_mx_lookup.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gns/test_gns_mx_lookup.sh b/src/gns/test_gns_mx_lookup.sh new file mode 100755 index 000000000..545d21d00 --- /dev/null +++ b/src/gns/test_gns_mx_lookup.sh | |||
@@ -0,0 +1,19 @@ | |||
1 | #!/bin/bash | ||
2 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT | ||
3 | rm -r `gnunet-config -c test_gns_lookup.conf -s PATHS -o SERVICEHOME` | ||
4 | TEST_MX="mail.gnunet" | ||
5 | gnunet-arm -s -c test_gns_lookup.conf | ||
6 | gnunet-identity -C testego -c test_gns_lookup.conf | ||
7 | gnunet-namestore -p -z testego -a -n gnunet -t MX -V $TEST_MX -e never -c test_gns_lookup.conf | ||
8 | RES_MX=$(timeout 5 gnunet-gns --raw -z testego -u www.gnu -t MX -c test_gns_lookup.conf) | ||
9 | gnunet-namestore -z testego -d -n www -t MX -V $TEST_MX -e never -c test_gns_lookup.conf | ||
10 | gnunet-identity -D testego -c test_gns_lookup.conf | ||
11 | gnunet-arm -e -c test_gns_lookup.conf | ||
12 | |||
13 | if [ "$RES_MX" == "$TEST_MX" ] | ||
14 | then | ||
15 | exit 0 | ||
16 | else | ||
17 | echo "Failed to resolve to proper IP, got $RES_MX." | ||
18 | exit 1 | ||
19 | fi | ||