etc/resolv.conf gets overwritten with blank file upon boot.

Rick Stevens rstevens at vitalstream.com
Wed Mar 9 01:39:30 UTC 2005


jludwig wrote:
> On Tuesday 08 March 2005 01:04 pm, Nat Gross wrote:
> 
>>Hi;
>>I recently changed my stations to NOT use dhcp (as well as the Linksys
>>router) and everything is fine and dandy.
>>EXCEPT, that upon every re-boot, the etc/resolv.conf which has my isp's
>>dns's, gets overwritten with a blank file, and my web programs cease to
>>operate. The resolv.conf sitting in etc/sysconfig/networking.... is ok,
>>and I just copy it over to etc/resolv.conf.
>>Which program is doing this, and how do I tell it to stop.
>>
>>Thank you;
>>-nat
>>ps. While I was using dhcp, the router was also supplying the
>>nameservers, so I didn't need /etc/resolv.conf.

You o need /etc/resolv.conf, DHCP or not.  That's what the resolver
library looks at to find the appropriate DNS services.  Without it,
you only have the items in /etc/hosts.

> You could chattr the file to immutable, and this should cause some sort of 
> errer message.

The way to prevent DHCP from overwriting /etc/resolv.conf is to set
"PEERDNS=no" in /etc/sysconfig/network-scripts/ifcfg-ethx (see the
stuff around line 288 in /etc/sysconfig/network-scripts/ifup).
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-                   "The bogosity meter just pegged."                -
----------------------------------------------------------------------




More information about the fedora-list mailing list