[CentOS] resolv.conf rewritten every reboot. How to figure out who and why?
Robert Heller
heller at deepsoft.com
Thu Oct 8 23:04:16 UTC 2009
At Thu, 08 Oct 2009 14:54:36 -0700 CentOS mailing list <centos at centos.org> wrote:
>
> Dave wrote:
> >
> > [root at lee1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
> > # Broadcom Corporation NetXtreme BCM5751 Gigabit Ethernet PCI Express
> > DEVICE=eth0
> > BOOTPROTO=none
> > HWADDR=00:18:8b:0f:ad:c2
> > IPADDR=1[snip]0
> > ONBOOT=yes
> > DHCP_HOSTNAME=[snip]
> > DNS1=1[snip]0
> > DNS2=1[snip].2
> > NM_CONTROLLED=no
> > SEARCH=[snip]
> > NETMASK=255.255.255.0
> > DNS3=1[snip]0
> > GATEWAY=1[snip]0.1
> > TYPE=Ethernet
> > USERCTL=no
> > PEERDNS=yes
> > IPV6INIT=no
>
> Holy cow, something put every single option in that file.
> For static address, the minimum you need is this:
>
> DEVICE=eth0
> BOOTPROTO=none
Shouldn't that be:
BOOTPROTO=static
> HWADDR=00:18:8b:0f:ad:c2
> IPADDR=1[snip]0
> ONBOOT=yes
> NETMASK=255.255.255.0
> TYPE=Ethernet
>
> And you can either leave GATEWAY there or put it in /etc/sysconfig/network
>
> I assume it's because of PEERDNS=yes, and you'll have to try to be sure,
> but anyway all that junk serves no purpose there (well, arguably you
> could put back USERCTL and stuff like that, if you really need it).
>
--
Robert Heller -- 978-544-6933
Deepwoods Software -- Download the Model Railroad System
http://www.deepsoft.com/ -- Binaries for Linux and MS-Windows
heller at deepsoft.com -- http://www.deepsoft.com/ModelRailroadSystem/
More information about the CentOS
mailing list