Debian Codegraph @

testdata/fast_reload_most_options.tdir/fast_reload_most_options.pre

raw
1 # #-- fast_reload_most_options.pre--#
2 # source the master var file when it's there
3 [ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
4 # use .tpkg.var.test for in test variable passing
5 [ -f .tpkg.var.test ] && source .tpkg.var.test
6
7 PRE="../.."
8 . ../common.sh
9 # if no threads; exit
10 if grep -e "define HAVE_PTHREAD 1" -e "define HAVE_SOLARIS_THREADS 1" -e "define HAVE_WINDOWS_THREADS 1" $PRE/config.h; then
11 echo "have threads"
12 else
13 skip_test "no threads"
14 fi
15
16 get_random_port 1
17 UNBOUND_PORT=$RND_PORT
18 echo "UNBOUND_PORT=$UNBOUND_PORT" >> .tpkg.var.test
19
20 # make config file
21 CONTROL_PATH=/tmp
22 CONTROL_PID=$$
23 sed -e 's/@PORT\@/'$UNBOUND_PORT'/' -e 's?@CONTROL_PATH\@?'$CONTROL_PATH'?' -e 's/@CONTROL_PID@/'$CONTROL_PID'/' < fast_reload_most_options.conf > ub.conf
24 # start unbound in the background
25 PRE="../.."
26 $PRE/unbound -d -c ub.conf >unbound.log 2>&1 &
27 UNBOUND_PID=$!
28 echo "UNBOUND_PID=$UNBOUND_PID" >> .tpkg.var.test
29 echo "CONTROL_PATH=$CONTROL_PATH" >> .tpkg.var.test
30 echo "CONTROL_PID=$CONTROL_PID" >> .tpkg.var.test
31
32 cat .tpkg.var.test
33 wait_unbound_up unbound.log