[CS-FSLUG] Nameserver value disappears?

Jukka jukka.ylonen at gmail.com
Thu Mar 2 12:41:29 CST 2006


On 3/2/06, Tim Young <Tim.Young at lightsys.org> wrote:
> Sorry, I have not tracked what distro you use.  :)  Could you include
> that in your response?

I use Suse 10.0

> I assume you are storing the nameserver value in /etc/resolv.conf?
> Most forms of Linux use that location.

It seems to be true with Suse also - when I set value manually,
/etc/resolv.conf changes from "; generated by NetworkManager, do not
edit!"

to:

"nameserver 192.168.0.254
search site"

> There are a few things that will change the nameserver.  DHCP, dial-up
> (yes, the ancient modem concept), VPNS, and there may be one or two
> others that I cannot think of immediately.
>
> If it is truly happening during shutdown or reboot, you should be able
> to do something like:
>     cd /etc/rc.d
>     grep -r -i nameserver *

(this did not produce any output)

>     grep -r resolv.conf *

boot.cleanup:   # Restore a possibly dynamically modified /etc/resolv.conf
boot.cleanup:   if ls /etc/resolv.conf.saved.by.* &>/dev/null ; then
boot.d/K14boot.cleanup: # Restore a possibly dynamically modified
/etc/resolv.conf
boot.d/K14boot.cleanup: if ls /etc/resolv.conf.saved.by.* &>/dev/null ; then
boot.d/S08boot.cleanup: # Restore a possibly dynamically modified
/etc/resolv.conf
boot.d/S08boot.cleanup: if ls /etc/resolv.conf.saved.by.* &>/dev/null ; then
linux:/etc/rc.d #

I checked what was in boot.d/KS08boot.cleanup, but it didn't make much
sense to me. As far I I could understand it contains some scripts in
case /etc/resolv.conf was modified, but it did not tell if file was
modified or what did it.

> These commands should list all the boot files that could modify the
> nameserver information.
> Then, check the networking commands also
>     cd /etc/sysconfig
>     grep -r -i nameserver *

network/dhcp:# messages. Some DHCP servers will update nameserver
entries (dynamic DNS).
network/scripts/ifstatus-ippp:              If you do not like that
ifup change your nameserver
network/scripts/ifstatus-isdn:              If you do not like that
ifup change your nameserver
network/scripts/ifup-ippp:                  If you do not like that
ifup change your nameserver
network/scripts/ifup-isdn:                  If you do not like that
ifup change your nameserver
network/scripts/ifdown-ippp:                If you do not like that
ifup change your nameserver
network/scripts/ifdown-isdn:                If you do not like that
ifup change your nameserver
network/config:# nameservers. Or pcmcia needs to set the correct
nameserver for the choosen

I checked some of those files (ifstatus-ippp, ifstatus-isdn and
ifup-ippp) and found a line that instructed: "...If you do not like
that ifup change your nameserver settings remove the option DNS1 from
/etc/sysconfig/network/providers/$PROVIDERNAME...", but could not find
any configuration-files from that (/etc/sysconfig/network/providers/)
directory.

>     grep -r resolv.conf *

network/dhcp:# Should the DHCP client modify /etc/resolv.conf at all?
network/dhcp:# resolv.conf will also stay untouched when
MODIFY_RESOLV_CONF_DYNAMICALLY
network/dhcp:# When writing a new /etc/resolv.conf, should the DHCP
client take an
network/ifcfg.template:# the default route or rewrite resolv.conf,
rewrite ntp.conf etc. There are two
network/ifcfg.template:# only be one resolv.conf file):
network/config:# change the /etc/resolv.conf dynamically at certain
times.  E.g. if ppp/ippp
network/config:# /etc/resolv.conf at all, then set this variable to "no".
You have new mail in /var/spool/mail/jukkamy

In network/config -file there was these instructions:

# There are some services (ppp, ippp, dhcp-client, pcmcia, hotplug) that have to
# change the /etc/resolv.conf dynamically at certain times.  E.g. if ppp/ippp
# establishes a connection and is supplied by the peer with a list of
# nameservers. Or pcmcia needs to set the correct nameserver for the choosen
# configuration scheme. If you don't like these services to change
# /etc/resolv.conf at all, then set this variable to "no".
# If unsure, leave it at the default (which is "yes").
#
MODIFY_RESOLV_CONF_DYNAMICALLY="yes"

I changed this variable to "no" and rebooted the machine, but id did
not have any effect.

>
> This should tell you which files might be the culprit.  Hopefully, from
> that, you can elliminate some of them as things you do not use, and
> narrow down the scope a bit.
>
>     - Tim Young




More information about the Christiansource mailing list