Bugzilla – Bug 136844
Missing option to preserve specified nameservers with dhcp
Last modified: 2007-06-05 09:37:46 UTC
A system with DHCP can be configured to change /etc/resolv.conf settings with dns values provided by a dhcp server. It is possible to force the system to keep the 'search' settings when dhcp is allowed to change the resolv.conf file, but sysconfig has no option to preserve one or more nameserver settings. Due to this it is not possible to usefully run a local dns server on the system for local use when it is needed to let dhcp servers provide dns servers to resolve non-local names. fi needed for laptops on the road used to develop websites on the local system and to connect to the internet to update/communicate from different dhcp networks.
1) preserve nameservers: Seife, that is what you wanted, too, isn't it? 2) Modify forwardes for local dns: See /etc/sysconfig/network/config:MODIFY_NAMED_CONF_DYNAMICALLY
I don't see the problem. Don't modify resolv.conf at all. (If you preserve searchlist as well as nameservers this effectively means "no modification" because that's the only things that would be modified.) Rewriting forwarders in local named.conf works fine... what's the problem?
Do you have an answer for me? Thanks in advance!
Reporter seems to have lost interest. But Seife told on monday me about a patch for modify_resolvconf. Seife, it's your turn to change something due to this bug report. Otherwise it will probably be resolved invalid soon.
Created attachment 67129 [details] patch for always adding a specific nameserver This is the patch i used. It is arguable if the "static" nameserver should be put before or after the "dynamic" nameservers. IIRC i had one usecase where before was better and one where after was better ;-(
How about MODIFY_RESOLV_CONF_STATIC_DNS instead of MODIFY_RESOLV_CONF_ALWAYS_ADD? And of course we should prepend the static dns: + for a in $MODIFY_RESOLV_CONF_STATIC_DNS $DNS; do OK? Seife? Peter?
Perfect. My patch was just meant as a suggestion or a proof of concept :-)
Good idea, I think
Added to svn. Will be in beta4