Changing the order of lookups in lookupd
[ Posted by Urban Hafner ]
So I was starting some web development these days and the code I was working on had the name of the website hardcoded. So I thought that the easiest way would be to add a new entry to the machines directory in Netinfo Manager. Unfortunately that didn’t work. It still resolved the IP address to the real one and not to 127.0.0.1. After a while I found out that lookupd (the program responsible for the actual DNS look up) searched the DNS server before the Netinfo Manager entries!
After searching for a long long time I found the article MacOSX lookupd and NetInfo by A.P. Lawrence. Changing the order of the search path of lookupd boiled down to the following lines:
sudo mkdir /etc/lookupd
echo LookupOrder Cache NI DNS FF DS > hosts
sudo mv hosts /etc/lookupd
sudo kill -1 `cat /var/run/lookupd.pid`
This was done on Mac OS X 10.4.8 but according to the article from above it works on 10.2.6, too.
I went to the first 
