Bug 136844

Summary: Missing option to preserve specified nameservers with dhcp
Product: [openSUSE] SUSE LINUX 10.0 Reporter: S. Handgraaf <s.handgraaf>
Component: NetworkAssignee: Christian Zoz <zoz>
Status: VERIFIED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Enhancement    
Priority: P5 - None    
Version: Final   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: patch for always adding a specific nameserver

Description S. Handgraaf 2005-12-04 04:11:58 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.
Comment 1 Christian Zoz 2005-12-05 13:54:31 UTC
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
Comment 2 Peter Poeml 2005-12-12 11:22:00 UTC
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?
Comment 3 Peter Poeml 2006-01-25 16:24:09 UTC
Do you have an answer for me? Thanks in advance!
Comment 4 Christian Zoz 2006-02-08 21:09:23 UTC
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.
Comment 5 Forgotten User ZhJd0F0L3x 2006-02-09 08:09:54 UTC
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 ;-(
Comment 6 Christian Zoz 2006-02-09 10:07:15 UTC
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?

Comment 7 Forgotten User ZhJd0F0L3x 2006-02-09 11:02:32 UTC
Perfect. My patch was just meant as a suggestion or a proof of concept :-)
Comment 8 Peter Poeml 2006-02-09 14:35:10 UTC
Good idea, I think
Comment 9 Christian Zoz 2006-02-13 15:06:06 UTC
Added to svn.
Will be in beta4