While using $DHCPCLIENT on gentoo a certain host did not have additional search entries to lookup DNS domain names. The first thought was to edit the resolv.conf file by hand, well it did get overwritten by asking for a new IP address. Second solution was generatating a resolv.conf.head with proper serach settings. This has worked however the name resolution for additional DNS domain-search did not work properly. The system has been using following ebuild net-misc/dhcpcd (6.10.1{tbz2}): A fully featured, yet light weight RFC2131 compliant DHCP client - this sounds great lite weight and RFC compliant. After reading the manual I did not discover a option howto add additional DNS entries, or at least ignore setting the search variable. It would have worked out maybe with the resolv.conf.head setting. Next approach after a hour, installing the real ISC dhcp client. All right there are options to supersede some DNS search entries. Set and done. /etc/dhcp/dhcpclient.conf has been edited everything is set. Restarting the net.eth0 interface. Still the same. only 1 dns saerch entry found. The */etc/resolv.conf looks like this:
# Generated by udhcpc for eth0
domain sub.example.com
nameserver 192.0.2.1
nameserver 192.0.2.10
Highly suspicious I have thought, there is no udhcpc on the system. Not in /bin nor in /sbin. udhcpc is a part of busybox. So it looks like gentoo does not use the ISC DHCP client even if it is configured and installed. After asking on freenode on the #gentoo support channel, the solutuon is to configure following, to force the system using dhcpclient. Adding following entry to /etc/conf.d/net brought the solution:
modules_eth0="dhclient"
After restarting, the system had the right configuration. Usually udhcpc isused if neither dhclient nor dhcpcd are found on the system. I thought this might be worth sharing for you gentooers.