You never specified what you want. "Sometimes"??? Is that a
specification? For instance, NXDOMAIN is *not* an error.
May be you actually want something like:
ADDRS=$(dig +short www.google.com); if [ -z "$ADDRS" ]; then echo
FAILURE; else echo SUCCESS; fi
For another example of testing dig resul
What do you mean "failed"? NXDOMAIN? SERVFAIL? Timeout? They are very
different things. I would strongly object to returning 1 when the answer
is NXDOMAIN (the query succeeded).
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to bind9 in U