aboutsummaryrefslogtreecommitdiff
path: root/src/gns/test_gns_lookup.sh
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-09-26 08:52:43 +0000
committerChristian Grothoff <christian@grothoff.org>2013-09-26 08:52:43 +0000
commit02e344b557bfb88630df2c6d04f028c602f0f009 (patch)
tree384e7c7ca0671623d71b23171cdf3a01920e7a6c /src/gns/test_gns_lookup.sh
parent626c2c8db33bfd00ed7d567a6e58182ca126df37 (diff)
downloadgnunet-02e344b557bfb88630df2c6d04f028c602f0f009.tar.gz
gnunet-02e344b557bfb88630df2c6d04f028c602f0f009.zip
-check if timeout command exists before using it
Diffstat (limited to 'src/gns/test_gns_lookup.sh')
-rwxr-xr-xsrc/gns/test_gns_lookup.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gns/test_gns_lookup.sh b/src/gns/test_gns_lookup.sh
index bfb59c50f..499109fc5 100755
--- a/src/gns/test_gns_lookup.sh
+++ b/src/gns/test_gns_lookup.sh
@@ -1,11 +1,12 @@
1#!/bin/bash 1#!/bin/bash
2trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT 2trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT
3rm -r `gnunet-config -c test_gns_lookup.conf -s PATHS -o SERVICEHOME` 3rm -r `gnunet-config -c test_gns_lookup.conf -s PATHS -o SERVICEHOME`
4which timeout &> /dev/null && DO_TIMEOUT="timeout 5"
4TEST_IP="127.0.0.1" 5TEST_IP="127.0.0.1"
5gnunet-arm -s -c test_gns_lookup.conf 6gnunet-arm -s -c test_gns_lookup.conf
6gnunet-identity -C testego -c test_gns_lookup.conf 7gnunet-identity -C testego -c test_gns_lookup.conf
7gnunet-namestore -p -z testego -a -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf 8gnunet-namestore -p -z testego -a -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf
8RES_IP=$(timeout 5 gnunet-gns --raw -z testego -u www.gnu -t A -c test_gns_lookup.conf) 9RES_IP=`$DO_TIMEOUT gnunet-gns --raw -z testego -u www.gnu -t A -c test_gns_lookup.conf`
9gnunet-namestore -z testego -d -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf 10gnunet-namestore -z testego -d -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf
10gnunet-identity -D testego -c test_gns_lookup.conf 11gnunet-identity -D testego -c test_gns_lookup.conf
11gnunet-arm -e -c test_gns_lookup.conf 12gnunet-arm -e -c test_gns_lookup.conf