# Trying to understand resolvconf behavior



## tommyj27 (Mar 13, 2014)

Is this the expected behavior for resolvconf()?

On initial system boot, dhclient() obtains domain/nameserver information, which is passed to resolvconf(), by way of dhclient-script. On subsequent system boots, DHCP options are again passed to resolvconf(). However, if they match the data from the previous lease, resolvconf() makes no attempt to update /etc/resolv.conf.

I have been banging my head against a case where resolvconf() doesn't function as _ expected after the initial boot of a system with a read-only root FS (unionfs md-backed /etc). After reading more about resolvconf() than I ever cared to know, this seems to be the behavior.

I was thinking of adding an init script for my specific situation (PXE booting hosts) that deletes the contents of /var/run/resolvconf/interfaces early in the boot cycle, so resolvconf() always updates /etc/rc.conf. Any drawbacks to this approach? Better ways?

Thank you!_


----------



## tingo (Mar 14, 2014)

Read the dhclient-script(8) man page. The files you are looking for are probably /etc/dhclient-enter-hooks and /etc/dhclient-exit-hooks.


----------



## tommyj27 (Mar 14, 2014)

Indeed. I ended up adding resolvconf_enable=NO to the enter hook. Much simpler than an init script, if you don't need the extra goodies of resolvconf()


----------

