On Redhat Linux 6 / Oracle Linux 6 (confirmed from 6.3), nslookup has return code "1" after nslookup failure instead of "0":
Oracle Linux 6:
$ nslookup unknown-not-reachable-node
Server: 10.35.249.52
Address: 10.35.249.52#53** server can't find unknown-not-reachable-node: NXDOMAIN
$ echo $?
1
Oracle Linux 5:Server: 10.35.249.52
Address: 10.35.249.52#53** server can't find unknown-not-reachable-node: NXDOMAIN
$ echo $?
1
$ nslookup unknown-not-reachable-node
Server: 10.35.249.52
Address: 10.35.249.52#53** server can't find unknown-not-reachable-node: NXDOMAIN
$ echo $? 0
Server: 10.35.249.52
Address: 10.35.249.52#53** server can't find unknown-not-reachable-node: NXDOMAIN
$ echo $? 0
0 comentários:
Postar um comentário