Univention Bugzilla – Bug 29999
dhclient overwrites resolv.conf
Last modified: 2013-01-15 15:19:09 CET
dhclient overwrites the resolv.conf with the DNS server given via DHCP. When ifup/ifdown will be used to configure the interface everything works fine, because /etc/network/if-up.d/00_resolvconf writes the given DNS server to dns/forwarder and so on. If the lease expires, dhclient will be executed and the resolv.conf contains only the given DNS server. Workaround: cat >>/etc/dhcp/dhclient-enter-hooks.d/resolvconf <<__HERE__ #!/bin/bash ucr commit /etc/resolv.conf __HERE__ The real fix should check that the nameserver given via DHCP will be set as dns/forwarder at least on a DC.
A new dhclient-exit-hooks.d has been added: /etc/dhcp/dhclient-exit-hooks.d/resolvconf It checks similar to /etc/network/if-up.d/00_resolvconf the /etc/resolv.conf. If a nameserver was given via DHCP this nameserver is added to the dns/forwarder* list. And the resolv.conf is re-created with the nameserver from UCR.
Tests: Fehler wird durch Installation des Paketes behoben, beim renew wird die Datei wieder korrigiert und die Nameserver als forwarder eingetragen. Advisory: OK
http://errata.univention.de/3.1-errata17.html