-#!/bin/bash
+#!/bin/sh
trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT
LOCATION=$(which gnunet-config)
# main label used during resolution
TEST_RECORD_NAME="homepage"
-if ! nslookup gnunet.org $TEST_IP_GNS2DNS &> /dev/null
+if ! nslookup gnunet.org $TEST_IP_GNS2DNS > /dev/null 2>&1
then
echo "Cannot reach DNS, skipping test"
exit 77
TEST_DOMAIN_ALT="${TEST_RECORD_NAME}.$MY_EGO"
TEST_DOMAIN_ALT2="docs.${TEST_RECORD_NAME}.$MY_EGO"
-which timeout &> /dev/null && DO_TIMEOUT="timeout 15"
+which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 15"
gnunet-arm -s -c test_gns_lookup.conf
rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME`
ret=0
-if [ "$RES_IP" == "$TEST_IP" ]
+if [ "$RES_IP" = "$TEST_IP" ]
then
echo "PASS: Resolved $TEST_DOMAIN to $RES_IP."
else
ret=1
fi
-if [ "$RES_IP6" == "$TEST_IP6" ]
+if [ "$RES_IP6" = "$TEST_IP6" ]
then
echo "PASS: Resolved $TEST_DOMAIN to $RES_IP6."
else
ret=1
fi
-if [ "$RES_IP_ALT" == "$TEST_IP" ]
+if [ "$RES_IP_ALT" = "$TEST_IP" ]
then
echo "PASS: Resolved $TEST_DOMAIN_ALT to $RES_IP_ALT."
else
ret=1
fi
-if [ "$RES_IP_ALT2" == "$TEST_IP_ALT2" ]
+if [ "$RES_IP_ALT2" = "$TEST_IP_ALT2" ]
then
echo "PASS: Resolved $TEST_DOMAIN_ALT2 to $RES_IP_ALT2."
else
-#!/bin/bash
+#!/bin/sh
# This file is in the public domain.
trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT
MY_EGO="myego"
rm -rf `gnunet-config -c test_gns_lookup.conf -s PATHS -o GNUNET_HOME -f`
-which timeout &> /dev/null && DO_TIMEOUT="timeout 30"
+which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30"
TEST_IP="dead::beef"
gnunet-arm -s -c test_gns_lookup.conf
gnunet-identity -C $MY_EGO -c test_gns_lookup.conf
gnunet-arm -e -c test_gns_lookup.conf
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
-#!/bin/bash
+#!/bin/sh
# This file is in the public domain.
trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT
fi
rm -rf `gnunet-config -c test_gns_lookup.conf -s PATHS -o GNUNET_HOME -f`
-which timeout &> /dev/null && DO_TIMEOUT="timeout 30"
+which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30"
TEST_IP="127.0.0.1"
MY_EGO="myego"
LABEL="www"
gnunet-identity -D $MY_EGO -c test_gns_lookup.conf
gnunet-arm -e -c test_gns_lookup.conf
-if [ "$RES_IP" == "$TEST_IP" ]
+if [ "$RES_IP" = "$TEST_IP" ]
then
exit 0
else
-#!/bin/bash
+#!/bin/sh
# This file is in the public domain.
trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT
fi
rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME`
-which timeout &> /dev/null && DO_TIMEOUT="timeout 5"
+which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 5"
MY_EGO="myego"
TEST_MX="5,mail.+"
RES_MX=`echo $RES_MX | tr [A-Z] [a-z]`
WANT_MX=`echo $WANT_MX | tr [A-Z] [a-z]`
-if [ "$RES_MX" == "$WANT_MX" ]
+if [ "$RES_MX" = "$WANT_MX" ]
then
exit 0
else
-#!/bin/bash
+#!/bin/sh
# This file is in the public domain.
trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT
rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME`
-which timeout &> /dev/null && DO_TIMEOUT="timeout 5"
+which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 5"
TEST_IP="127.0.0.1"
gnunet-arm -s -c test_gns_lookup.conf
gnunet-identity -C $MY_EGO -c test_gns_lookup.conf
gnunet-arm -e -c test_gns_lookup.conf
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
-#!/bin/bash
+#!/bin/sh
# This file is in the public domain.
trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT
OTHER_EGO="delegatedego"
rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME`
-which timeout &> /dev/null && DO_TIMEOUT="timeout 5"
+which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 5"
TEST_IP="127.0.0.1"
gnunet-arm -s -c test_gns_lookup.conf
gnunet-identity -C $MY_EGO -c test_gns_lookup.conf
gnunet-arm -e -c test_gns_lookup.conf
rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME`
-if [ "$RES_IP_EXP" == "$TEST_IP" ]
+if [ "$RES_IP_EXP" = "$TEST_IP" ]
then
echo "Failed to properly expire IP, got $RES_IP_EXP."
exit 1
fi
-if [ "$RES_IP" == "$TEST_IP" ]
+if [ "$RES_IP" = "$TEST_IP" ]
then
exit 0
else
-#!/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 ]
exit 1
fi
-if [ "x$RES_IP_REV" == "x" ]
+if [ "x$RES_IP_REV" = "x" ]
then
exit 0
else
-#!/bin/bash
+#!/bin/sh
# This file is in the public domain.
trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT
exit 77
fi
-which timeout &> /dev/null && DO_TIMEOUT="timeout 5"
+which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 5"
rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME`
MY_EGO="myego"
TEST_RECORD_NAME="homepage"
TEST_RECORD_GNS2DNS="gnunet.org"
-if ! nslookup $TEST_RECORD_GNS2DNS $TEST_IP_GNS2DNS &> /dev/null
+if ! nslookup $TEST_RECORD_GNS2DNS $TEST_IP_GNS2DNS > /dev/null 2>&1
then
echo "Cannot reach DNS, skipping test"
exit 77
gnunet-identity -C $MY_EGO -c test_gns_lookup.conf
gnunet-namestore -p -z $MY_EGO -a -n $TEST_RECORD_NAME -t GNS2DNS -V ${TEST_RECORD_GNS2DNS}@${TEST_IP_GNS2DNS} -e never -c test_gns_lookup.conf
RES_SOA=`$DO_TIMEOUT gnunet-gns --raw -u $TEST_DOMAIN -t SOA -c test_gns_lookup.conf`
-gnunet-namestore -z $MY_EGO -d -n $TEST_RECORD_NAME -t GNS2DNS -V ${TEST_RECORD_GNS2DNS}@${TEST_IP_GNS2DNS} -e never -c test_gns_lookup.conf &> /dev/null
+gnunet-namestore -z $MY_EGO -d -n $TEST_RECORD_NAME -t GNS2DNS -V ${TEST_RECORD_GNS2DNS}@${TEST_IP_GNS2DNS} -e never -c test_gns_lookup.conf > /dev/null 2>&1
gnunet-identity -D $MY_EGO -c test_gns_lookup.conf
gnunet-arm -e -c test_gns_lookup.conf
rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME`
-#!/bin/bash
+#!/bin/sh
# This file is in the public domain.
trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT
fi
rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME`
-which timeout &> /dev/null && DO_TIMEOUT="timeout 30"
+which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30"
TEST_TXT="GNS powered txt record data"
MY_EGO="myego"
LABEL="testtxt"
gnunet-arm -e -c test_gns_lookup.conf
rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME`
-if [ "$RES_TXT" == "$TEST_TXT" ]
+if [ "$RES_TXT" = "$TEST_TXT" ]
then
exit 0
else