1*7a540f2bSchristos# #-- blanks_https.test --# 2*7a540f2bSchristos# source the master var file when it's there 3*7a540f2bSchristos[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master 4*7a540f2bSchristos# use .tpkg.var.test for in test variable passing 5*7a540f2bSchristos[ -f .tpkg.var.test ] && source .tpkg.var.test 6*7a540f2bSchristos 7*7a540f2bSchristosPRE="../.." 8*7a540f2bSchristos# do the test 9*7a540f2bSchristosTARGET=ns1.blanks.example.com. 10*7a540f2bSchristosecho "> dig $TARGET" 11*7a540f2bSchristosdig @localhost -p $UNBOUND_PORT $TARGET | tee outfile 12*7a540f2bSchristosif grep SERVFAIL outfile; then 13*7a540f2bSchristos echo "> try again" 14*7a540f2bSchristos dig @localhost -p $UNBOUND_PORT $TARGET | tee outfile 15*7a540f2bSchristosfi 16*7a540f2bSchristosif grep SERVFAIL outfile; then 17*7a540f2bSchristos echo "> try again" 18*7a540f2bSchristos sleep 1 19*7a540f2bSchristos dig @localhost -p $UNBOUND_PORT $TARGET | tee outfile 20*7a540f2bSchristosfi 21*7a540f2bSchristosif grep SERVFAIL outfile; then 22*7a540f2bSchristos echo "> try again" 23*7a540f2bSchristos sleep 1 24*7a540f2bSchristos dig @localhost -p $UNBOUND_PORT $TARGET | tee outfile 25*7a540f2bSchristosfi 26*7a540f2bSchristosif grep SERVFAIL outfile; then 27*7a540f2bSchristos echo "> try again" 28*7a540f2bSchristos sleep 1 29*7a540f2bSchristos dig @localhost -p $UNBOUND_PORT $TARGET | tee outfile 30*7a540f2bSchristosfi 31*7a540f2bSchristosif grep SERVFAIL outfile; then 32*7a540f2bSchristos echo "> try again" 33*7a540f2bSchristos sleep 10 34*7a540f2bSchristos dig @localhost -p $UNBOUND_PORT $TARGET | tee outfile 35*7a540f2bSchristosfi 36*7a540f2bSchristosif grep SERVFAIL outfile; then 37*7a540f2bSchristos echo "> try again" 38*7a540f2bSchristos sleep 10 39*7a540f2bSchristos dig @localhost -p $UNBOUND_PORT $TARGET | tee outfile 40*7a540f2bSchristosfi 41*7a540f2bSchristosecho "> cat logfiles" 42*7a540f2bSchristoscat petal.log 43*7a540f2bSchristoscat unbound.log 44*7a540f2bSchristosecho "> check answer" 45*7a540f2bSchristosif grep "192.0.2.1" outfile; then 46*7a540f2bSchristos echo "OK" 47*7a540f2bSchristoselse 48*7a540f2bSchristos echo "Not OK" 49*7a540f2bSchristos exit 1 50*7a540f2bSchristosfi 51*7a540f2bSchristos 52*7a540f2bSchristosexit 0 53