[Bug 854705] Re: dig returns 0 regardless of result of query

2011-09-21 Thread Stéphane Bortzmeyer
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 results,

[Bug 854705] Re: dig returns 0 regardless of result of query

2011-09-20 Thread Stéphane Bortzmeyer
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