I:waiting for nameserver to load, ok'd by Evan

This commit is contained in:
Mark Andrews
2012-02-03 04:44:17 +00:00
parent 06c1095b43
commit ca92b02363
2 changed files with 19 additions and 2 deletions

View File

@@ -14,9 +14,10 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: clean.sh,v 1.1 2008/07/17 01:14:16 marka Exp $
# $Id: clean.sh,v 1.2 2012/02/03 04:44:17 marka Exp $
#
# Clean up after lwresd tests.
#
rm -f */named.memstats
rm -f dig.out

View File

@@ -15,12 +15,28 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: tests.sh,v 1.20 2011/10/17 23:46:33 tbox Exp $
# $Id: tests.sh,v 1.21 2012/02/03 04:44:17 marka Exp $
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
status=0
echo "I:waiting for nameserver to load"
for i in 0 1 2 3 4 5 6 7 8 9
do
ret=0
for zone in . example1 e.example1 example2 10.10.10.in-addr.arpa \
ip6.int ip6.arpa
do
$DIG +tcp -p 5300 @10.53.0.1 soa $zone > dig.out
grep "status: NOERROR" dig.out > /dev/null || ret=1
grep "ANSWER: 1," dig.out > /dev/null || ret=1
done
test $ret = 0 && break
sleep 1
done
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
echo "I:using resolv.conf"
ret=0