hostname=$(host $3) || exit 1
# dhcphostname is set, get the PTR for the ip
hostname=$(echo ${hostname} | awk '{ print substr($5, 0, length($5)-1) }')
if [ -n "$hostname" ] ; then
hostname=$(host $3) || exit 1
# dhcphostname is set, get the PTR for the ip
hostname=$(echo ${hostname} | awk '{ print substr($5, 0, length($5)-1) }')
if [ -n "$hostname" ] ; then