Click to See Complete Forum and Search --> : resolv.conf gets wipped out at reboot


smkamene
06-21-2004, 08:50 AM
Hello guys. Every time i reboot my box i have to manully go in and modify /etc/resolv.conf . I am using DHCP. Resolv.conf does not get populated the searchname field. What is wrong? How can i stop dhcp client from modify my resolv.conf.

Fedora Core 1

Thanks

jumpedintothefire
06-21-2004, 09:06 AM
edit:
/etc/sysconfig/network-scripts/ifcfg-eth0
add:
PEERDNS=no

Icarus
06-21-2004, 09:10 AM
This is a dynamic file, any changes will be overwriiten when dhcp starts. The namesevers should be passed into that file from the DHCP server, if it is blank I would look at the DHCP server to make sure it is working properly with the proper nameservers

There is also a way to set ones, but I don't have the resolvconf(8) man page available, maybe someone knows this process?

DMR
06-21-2004, 07:13 PM
Actually, the behaviour of your DHCP client is probably what you want to modify. The client daemons have options that you can specify which determine the way in which the info obtained from your DHCP server filters into your system settings.

For instance, if you use the "dhcpcd" client, specifying the -R option in whatever script starts the daemon wil prevent it from overwriting your /etc/resolv.conf file.

jumpedintothefire
06-22-2004, 08:04 AM
With redhat PEERDNS=no will set the "-R" option for dhcpcd, works with dhclient and pump also.

DMR
06-22-2004, 01:26 PM
Originally posted by jumpedintothefire
With redhat PEERDNS=no will set the "-R" option for dhcpcd, works with dhclient and pump also.

Ah, right. Thanks- forgot about that! :)

smkamene
06-22-2004, 02:48 PM
Thank you guys. "PEERDNS=no" did it.