#!/bin/sh
# -*- mode: sh; fill-column: 75; tab-width: 8; coding: utf-8-unix -*-

# Dual Linux or msys64

prog=$( basename $0 .bash )
ROLE=proxy

PREFIX=/usr/local
[ -n "$MSYSTEM" ] && EXET=msys || EXET=sh

. /usr/local/bin/usr_local_tput.bash

[ -f $PREFIX/etc/testforge/testforge.bash ] \
    && . /usr/local/etc/testforge/testforge.bash

grep -v '#\|127.0.0.1' /etc/hosts | while read ip b ; do
	[ -z "$ip" ] && continue
	[ -z "$b" ] && continue
	dig -x $ip | grep "$b" && \
		INFO $ip $b || \
		WARN $ip $b `dig -x $ip | grep 'IN.*\.'`
	dig $b | grep 'IN.*\.'
	dig @8.8.8.8 $b | grep 'IN.*\.'
done
