Disable resolvconf

I can't imagine why I would ever want my /etc/resolv.conf to change as a result of changes to my network configuration. Or as a result of anything. So I've tried to track down all those pesky programs that muck with resolv.conf and disable them. One offender is dhcp, and I disable it like this:

sed -i '/^  *mv/s/^/#/' /sbin/dhclient-script

But then there's pppd, wicd, and others I don't even know about. So finally I resorted to making the file immutable:

chattr +i /etc/resolv.conf

So when resolvconf came along I thought that would be a great way to disable them all at once. Turns out it's not that easy. The man page suggests removing the resolv.conf symlink and replacing it with a file. That works, but you get an ugly warning message on all network events. The man page says you can suppress this by setting REPORT_ABSENT_SYMLINK to "no" in /etc/default/resolvconf. It doesn't give any examples or the syntax of this file, so I tracked down the scripts and found that the man page is wrong, you can't suppress the error message.

So here's what I ended up doing.

mv /sbin/resolvconf /sbin/resolvconf-; cp -p /bin/true /sbin/resolvconf

Jim Rees