NetworkManager overwriting resolv.conf

Christopher A. Williams chriswfedora at cawllc.com
Sat Jan 17 18:10:07 UTC 2009


I have been pulling my hair out over this, but seem to have a
work-around after a lot of searching, but I'd like to know if there's a
better way. Here's the info:

I'm building a server with F10 that (obviously) needs a static IP
address. It seems the best way to handle what's needed is to go ahead
and let NetworkManager still control the IP address.

BUT... I need to have that IP address activated at system startup, so it
must be configured via system-config-network as System eth0 (and eth1 in
this case) and then be controlled by NM.

Unfortunately, this machine - like most systems today - also needs DNS.
I'm running named as it's meant to be an internal local DNS server for a
bunch of other stuff too, but NM has a VERY nasty habit of
overwriting /etc/resolv.conf with something that's basically BLANK. So
every reboot, you have problems resolving DNS.

The only solution I have found so far is to:
1) properly re-create /etc/resolv.conf to what it should be
2) set the immutable flag on it (chattr +i /etc/resolv.conf)

This prevents NM from overwriting it.

OK - Fine. This isn't pretty (no work-around is), but it gets me what I
need for now.

Since this is a known bug, do we know when there will be a fix for it,
preferably in F10? Is there a better way of handling this problem until
then?

Cheers,

Chris


--
====================================
"If you get to thinkin' you're a
person of some influence, try
orderin' someone else's dog around."

--Cowboy Wisdom




More information about the fedora-list mailing list