diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-09-26 08:52:43 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-09-26 08:52:43 +0000 |
commit | 02e344b557bfb88630df2c6d04f028c602f0f009 (patch) | |
tree | 384e7c7ca0671623d71b23171cdf3a01920e7a6c /src/gns/test_gns_mx_lookup.sh | |
parent | 626c2c8db33bfd00ed7d567a6e58182ca126df37 (diff) | |
download | gnunet-02e344b557bfb88630df2c6d04f028c602f0f009.tar.gz gnunet-02e344b557bfb88630df2c6d04f028c602f0f009.zip |
-check if timeout command exists before using it
Diffstat (limited to 'src/gns/test_gns_mx_lookup.sh')
-rwxr-xr-x | src/gns/test_gns_mx_lookup.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gns/test_gns_mx_lookup.sh b/src/gns/test_gns_mx_lookup.sh index 79d4860c2..563f750c2 100755 --- a/src/gns/test_gns_mx_lookup.sh +++ b/src/gns/test_gns_mx_lookup.sh | |||
@@ -1,13 +1,14 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT | 2 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT |
3 | rm -fr `gnunet-config -c test_gns_lookup.conf -s PATHS -o SERVICEHOME` | 3 | rm -fr `gnunet-config -c test_gns_lookup.conf -s PATHS -o SERVICEHOME` |
4 | which timeout &> /dev/null && DO_TIMEOUT="timeout 5" | ||
4 | 5 | ||
5 | TEST_MX="5,mail.gnu" | 6 | TEST_MX="5,mail.gnu" |
6 | gnunet-arm -s -c test_gns_lookup.conf | 7 | gnunet-arm -s -c test_gns_lookup.conf |
7 | gnunet-identity -C testego -c test_gns_lookup.conf | 8 | gnunet-identity -C testego -c test_gns_lookup.conf |
8 | gnunet-namestore -p -z testego -a -n www -t MX -V "$TEST_MX" -e never -c test_gns_lookup.conf | 9 | gnunet-namestore -p -z testego -a -n www -t MX -V "$TEST_MX" -e never -c test_gns_lookup.conf |
9 | 10 | ||
10 | RES_MX=$(timeout 5 gnunet-gns --raw -z testego -u www.gnu -t MX -c test_gns_lookup.conf) | 11 | RES_MX=`$DO_TIMEOUT gnunet-gns --raw -z testego -u www.gnu -t MX -c test_gns_lookup.conf` |
11 | gnunet-namestore -z testego -d -n www -t MX -V "$TEST_MX" -e never -c test_gns_lookup.conf | 12 | gnunet-namestore -z testego -d -n www -t MX -V "$TEST_MX" -e never -c test_gns_lookup.conf |
12 | gnunet-identity -D testego -c test_gns_lookup.conf | 13 | gnunet-identity -D testego -c test_gns_lookup.conf |
13 | gnunet-arm -e -c test_gns_lookup.conf | 14 | gnunet-arm -e -c test_gns_lookup.conf |