Linode.com Forum Forum Index Linode.com Forum
Linode Community Forums
 


resolv.conf is changed when linode is rebooted

Click here to go to the original topic

 
       Linode.com Forum Forum Index -> Linux Networking
Author Message
caveman



Joined: 11 Jul 2006
Posts: 5

Posted: Tue Jul 11, 2006 11:34 pm    Post subject: resolv.conf is changed when linode is rebooted  

I'm running Slackware 10. I run netconfig to set the ip a static address and dns server, and confirm that etc/resolv.conf is updated. When I reboot the linode my resolv.conf has all the name servers removed and only one line for the search domain. Any ideas?
Back to top  
gmt



Joined: 20 Jul 2003
Posts: 96
Location: Tropical Queensland, Australia

Posted: Wed Jul 12, 2006 7:27 am    Post subject:  

Linode changes resolv.conf on boot, to set default nameservers. If you modify resolv.conf I have no idea what you will get when booting.
Back to top  
caker



Joined: 15 Apr 2003
Posts: 2387
Location: Galloway, NJ

Posted: Wed Jul 12, 2006 2:38 pm    Post subject:  

gmt wrote: Linode changes resolv.conf on boot, to set default nameservers. If you modify resolv.conf I have no idea what you will get when booting.
We do? That's news to me. :)

It's usually dhcpd that's the culprit, or some other init script.

-Chris
Back to top  
gmt



Joined: 20 Jul 2003
Posts: 96
Location: Tropical Queensland, Australia

Posted: Wed Jul 12, 2006 4:15 pm    Post subject:  

The date on /etc/resolv.conf changes every time I reboot, and I certainly didn't configure it.
Back to top  
pclissold



Joined: 24 Oct 2003
Posts: 471
Location: Netherlands

Posted: Wed Jul 12, 2006 5:15 pm    Post subject:  

On my Linode (running Gentoo), /etc/init.d/domainname has a tinker with /etc/resolv.conf at every boot. My emergency Debian doesn't look as if any changes are made during boot.
Back to top  
Bdragon



Joined: 30 Sep 2005
Posts: 13

Posted: Wed Jul 12, 2006 5:54 pm    Post subject:  

*edit* Missed the part about you using static config...

What's your /etc/rc.d/rc.inet1.conf look like?

If you have a line like Code: USE_DHCP[0]="yes" in there, it will still kick in the dhcp client...


------------------ original text follows --------------------
I'm betting it's dhcpcd doing that.

Run it with the -R option.

Read the manpage for dhcpcd.

Fix:
Look for "/sbin/dhcpcd" in /etc/rc.d/rc.inet1

Add the -R switch to the command invocation on interface start (probabaly around line 74)

Code:           echo "/etc/rc.d/rc.inet1:  /sbin/dhcpcd -d -t 10 -h ${DHCP_HOSTNAME[$1
]} eth${1}" | $LOGGER
          /sbin/dhcpcd -d -t 10 -h ${DHCP_HOSTNAME[$1]} eth${1}
        else
          echo "/etc/rc.d/rc.inet1:  /sbin/dhcpcd -d -t 10 eth${1}" | $LOGGER
          /sbin/dhcpcd -d -t 10 eth${1}
        fi

becomes
Code:           echo "/etc/rc.d/rc.inet1:  /sbin/dhcpcd -d -R -t 10 -h ${DHCP_HOSTNAME[$1
]} eth${1}" | $LOGGER
          /sbin/dhcpcd -d -R -t 10 -h ${DHCP_HOSTNAME[$1]} eth${1}
        else
          echo "/etc/rc.d/rc.inet1:  /sbin/dhcpcd -d -R -t 10 eth${1}" | $LOGGER
          /sbin/dhcpcd -d -t 10 eth${1}
        fi
Back to top  
caveman



Joined: 11 Jul 2006
Posts: 5

Posted: Thu Jul 13, 2006 6:24 pm    Post subject:  

What's your /etc/rc.d/rc.inet1.conf look like?

If you have a line like Code:
USE_DHCP[0]="yes"
in there, it will still kick in the dhcp client...


It was USE_DHCP[0]=""

I changed it to USE_DHCP[0]="No" and it fixed it.
Back to top  
Jay



Joined: 14 Nov 2004
Posts: 128
Location: NC, USA

Posted: Fri Jul 14, 2006 7:45 am    Post subject:  

Also be aware that if a package named "resolvconf" is installed, it will eat your /etc/resolv.conf on boot (do an ls -l /etc/resolv.conf and make sure it's NOT a symlink)
Back to top  
 
       Linode.com Forum Forum Index -> Linux Networking
Page 1 of 1