dhcpcd gains some resolvconf functionality

14 Aug 2008 • 1 min read

/etc/resolv.conf is a single file that is often stamped on by many different applications.One example of this is dhcpcd running on multiple interfaces.openresolv is a resolvconf implementation to help ahem resolve this by taking resolv.confs from these applications to make a single sane file.dhcpcd has always supported resolvconf when available - but what if it's not? :?dhcpcd restores the last saved resolv.conf when it fails/exits to try and make things work, but it's not exactly optimal as the order interfaces go down may not be the same order as when they come up.Well, fear no more! As dhcpcd-4 is now scriptable, implementing basic resolvconf functionality is fairly trivial. So dhcpcd remembers each interface resolv.conf and makes a single one each time dhcpcd calls its hook script.You should note that this is no replacement for resolvconf, as resolvconf is desgined to trivially hook into other packages, such as OpenVPN. Also, resolvconf can configure local nameservers such as BIND and dnsmasq which allows for a more powerful solution as libc is very limited here.