resolv.conf is changed when linode is rebooted
7 Replies
@gmt:
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
What's your /etc/rc.d/rc.inet1.conf look like?
If you have a line like
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)
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
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
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.