Re: resolv.conf rewritten every reboot. How to figure out who and why?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Dave wrote:
> 
> [root@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
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).

-- 
Florin Andrei

http://florin.myip.org/

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux