diff options
Diffstat (limited to 'testdata/fwd_zero.tdir/fwd_zero.pre')
-rw-r--r-- | testdata/fwd_zero.tdir/fwd_zero.pre | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/testdata/fwd_zero.tdir/fwd_zero.pre b/testdata/fwd_zero.tdir/fwd_zero.pre new file mode 100644 index 000000000000..eaa7262e47dd --- /dev/null +++ b/testdata/fwd_zero.tdir/fwd_zero.pre @@ -0,0 +1,31 @@ +# #-- fwd_zero.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 +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_zero.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_zero.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_unbound_up unbound.log + |