I'm running FreeBSD 5.4 on the system in question. It was
my understanding on newer Unixes that things like a call to gethostbyname(3)
would cause it to go against the nsdispatch(3) in libc and determine
what method to perform its various lookups. Right now its set to
read nsswitch.conf and that has "hosts: files dns". That, to me, means
it'll go against /etc/hosts first, then do lookups against bind.
The problem I have switching to just "hosts: files" is that
this system does alot of other services besides a database, that
depend on being able to do reliable forward and reverse DNS queries.
I understand you then want me to put all the names into my
/etc/hosts, but doing so doesn't buy me what I need for all the rest
of the services on the box. I also have TCPWrappers running depending
on domain names out of my control, so it would mean that every time
they added/deleted a host, I would have to be told of it. I think
/etc/hosts would also do forward DNS only, while TCPWrappers also
wants reverse DNS (PTR).
While in concept the suggestion is a work around, I
think it then breaks every thing around it.