# #-- fwd_ancil.pre--# # source the master var file when it's there [ -f ../.tpkg.var.master ] && source ../.tpkg.var.master # use .tpkg.var.test for in test variable passing [ -f .tpkg.var.test ] && source .tpkg.var.test . ../common.sh if test `hostname`"" = "dicht.nlnetlabs.nl"; then skip_test "In jail, no ::1, skip test" fi get_random_port 2 UNBOUND_PORT=$RND_PORT FWD_PORT=$(($RND_PORT + 1)) echo "UNBOUND_PORT=$UNBOUND_PORT" >> .tpkg.var.test echo "FWD_PORT=$FWD_PORT" >> .tpkg.var.test # start forwarder get_ldns_testns $LDNS_TESTNS -p $FWD_PORT fwd_ancil.testns >fwd.log 2>&1 & FWD_PID=$! echo "FWD_PID=$FWD_PID" >> .tpkg.var.test # make config file sed -e 's/@PORT\@/'$UNBOUND_PORT'/' -e 's/@TOPORT\@/'$FWD_PORT'/' < fwd_ancil.conf > ub.conf # start unbound in the background PRE="../.." $PRE/unbound -d -c ub.conf >unbound.log 2>&1 & UNBOUND_PID=$! echo "UNBOUND_PID=$UNBOUND_PID" >> .tpkg.var.test cat .tpkg.var.test wait_ldns_testns_up fwd.log # wait for unbound to come up # string 'Start of service' in log. wait_server_up_or_fail unbound.log "start of service" "disable interface-automatic" if fgrep "disable interface-automatic" unbound.log; then skip_test "skip test" fi