X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fgns%2Ftest_gns_zkey_lookup.sh;h=03118d74147eca7a169fc5b97c9fc1d91b24bd4e;hb=c29a8124f885f28f287e91ce7a0dabcdd6b17d50;hp=3121987806ae1fc9e9a5adfe52fa91bf9523d240;hpb=65377c3d9087635696f66b2444ef1d7eb39d4cd0;p=oweals%2Fgnunet.git diff --git a/src/gns/test_gns_zkey_lookup.sh b/src/gns/test_gns_zkey_lookup.sh index 312198780..03118d741 100755 --- a/src/gns/test_gns_zkey_lookup.sh +++ b/src/gns/test_gns_zkey_lookup.sh @@ -1,6 +1,7 @@ -#!/bin/bash +#!/bin/sh +# This file is in the public domain. trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT -which timeout &> /dev/null && DO_TIMEOUT="timeout 5" +which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 5" LOCATION=$(which gnunet-config) if [ -z $LOCATION ] @@ -14,7 +15,7 @@ then exit 77 fi -rm -rf /tmp/test-gnunet-gns-peer-1/ +rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` TEST_IP="127.0.0.1" gnunet-arm -s -c test_gns_lookup.conf @@ -27,9 +28,9 @@ RES_IP=`$DO_TIMEOUT gnunet-gns --raw -u www.${DELEGATED_PKEY} -t A -c test_gns_l gnunet-namestore -z testego -d -n b -t PKEY -V $DELEGATED_PKEY -e never -c test_gns_lookup.conf gnunet-namestore -z delegatedego -d -n www -t A -V $TEST_IP -e never -c test_gns_lookup.conf gnunet-arm -e -c test_gns_lookup.conf -rm -rf /tmp/test-gnunet-gns-peer-1/ +rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` -if [ "$RES_IP" == "$TEST_IP" ] +if [ "$RES_IP" = "$TEST_IP" ] then exit 0 else