Reaction score: 1,505
It took me days(weeks?) to find out about the existence of this resolvconf(8)... /etc/resolv.conf was magically changing it's contents... Heck, I was so frustrated that "it" insisted to change my working config... of course one tries to circumvent this. I did as well. I don't remember how I found out (crawling though "See Also" links in manpages?) or if someone told me.When I did back then, either the nohook option wasn't there yet or I missed it in the documentation pile, or I didn't manage getting it to work, so I had to figure out some means to protect the original /etc/resolv.conf file.
This apparently happens to many people. So maybe it is a documentation problem of some essential information that should be mentioned prominently on the first page actually being hidden in some appended document referenced only by footnote.
IIUC either dhclient(8) or the service(8) script should set hostname resolution via resolvconf(8) (into resolv.conf(5)), unless you explicitely deny that (see nohook mentioned above). Maybe tryAs for hostname resolution, I can't get this working via installerconfig. If I don't have an installerconfig and jump into the shell I can access the required hosts by name. I did include 'dhclient em0' in /etc/rc.local to achieve this.
service netif start em0instead of calling dhclient(8) directly. This will also set the appropriate routes. Do you also have an active WLAN interface? IIRC the last activated interface sets the default route; you can override that via
sysrc defaultrouter="IPv4.default.router"(this sets that into rc.conf(5)).