X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fgns%2Ftest_gns_cname_lookup.sh;h=00614f0382975e70fa41df84c8215120bb072cbe;hb=ea8c85c55b9df1b491713b79bb221b7476949742;hp=1a4c10268651d80c86ac5f8cc694ce2a734aaf63;hpb=37566e067645bf881b170796251a14d8d20202b8;p=oweals%2Fgnunet.git diff --git a/src/gns/test_gns_cname_lookup.sh b/src/gns/test_gns_cname_lookup.sh index 1a4c10268..00614f038 100755 --- a/src/gns/test_gns_cname_lookup.sh +++ b/src/gns/test_gns_cname_lookup.sh @@ -4,11 +4,17 @@ trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT LOCATION=$(which gnunet-config) if [ -z $LOCATION ] then - echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX" - exit 1 + LOCATION="gnunet-config" fi +$LOCATION --version &> /dev/null +if test $? != 0 +then + echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX" + exit 77 +fi + +rm -rf /tmp/test-gnunet-gns-peer-1/ -rm -rf `gnunet-config -c test_gns_lookup.conf -s PATHS -o GNUNET_HOME -f` TEST_DOMAIN_PLUS="www.gnu" TEST_DOMAIN_DNS="www3.gnu" TEST_IP_PLUS="127.0.0.1" @@ -35,6 +41,7 @@ gnunet-namestore -p -z testego -d -n $TEST_RECORD_NAME_PLUS -t CNAME -V $TEST_RE gnunet-namestore -p -z testego -d -n $TEST_RECORD_CNAME_SERVER -t A -V $TEST_IP_PLUS -e never -c test_gns_lookup.conf gnunet-identity -D testego -c test_gns_lookup.conf gnunet-arm -e -c test_gns_lookup.conf +rm -rf /tmp/test-gnunet-gns-peer-1/ if [ "$RES_CNAME_RAW" == "server.$TESTEGOZONE.zkey" ] then