Re: centos 6 - changing resolv.conf by hand gets overwritten by rebooting

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



I think that you want to create /etc/dhclient-enter-hooks
with this, for more info do a search on dhclient-enter-hooks

# vi /etc/dhclient-enter-hooks
make_resolv_conf(){
        :
}

Pete

On 08/27/15 15:36, George wrote:
given machine with C6 x86_64 (seen on C 6.6 but also before and probably still present on C6.7) only 1 interface, there is dhcp on this network (for kickstarting) but the machines have static ip's, and NO networkmanager installed

contents of resolv.conf
search some.domain.here
nameserver x.x.x.x #dns1
nameserver y.y.y.y #dns2

change resolv.conf to:
search some.newdomain.here
nameserver z.z.z.z #dns3
nameserver a.a.a.a #dns4

reboot machine and the contents of resolv.conf is again:
search some.domain.here
nameserver x.x.x.x #dns1
nameserver y.y.y.y #dns2

change it again to:
search some.newdomain.here
nameserver z.z.z.z #dns3
nameserver a.a.a.a #dns4
reboot again
now it stick to the last update.

Already tried to set /etc/sysconfig/network-scripts/ifcfg-eth0 NM_controlled=no
with no result
other suggestions around the internet suggest also to set in
/etc/sysconfig/network-scripts/ifcfg-eth0
usepeerdns=no
have not tried this but should check if this fixes stuff.

Question: can someone explain me WHY this would help if it does and if this a valid entry in /etc/sysconfig/network ? since I don't want to go over all my machines (a couple thousand) figuring out how many interfaces they have and what their names are to reconfigure that for each interface (some even suggest this should be done for lo too).

See also dozens of questions like that using google:
https://www.google.com/search?q=centos+6+overwrites+resolv.conf+reboot

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


--
If money can fix it, it's not a problem.
 -- Click and Clack the Tappet brothers

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://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