Changing the order of lookups in lookupd

Posted by Urban Hafner Tue, 28 Nov 2006 15:47:57 GMT

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.

Tags , , , ,  | 1 comment | no trackbacks

Comments

  1. Avatar Stefan said about 1 month later:

    I prefer to use the plain /etc/hosts file for that. If you don’t have the requested address in cache already (the referenced article mentions that, too), this works fine.

Trackbacks

Use the following link to trackback from your own site:
http://bettong.net/trackbacks?article_id=changing-the-order-of-lookups-in-lookupd&day=28&month=11&year=2006

(leave url/email »)