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

ifup eth0 - preventing dhcpcd replacing /etc/resolv.conf



I've given up using pump -- it doesn't work properly with my cable modem
provider, and switched to dhcpcd.  I'm having problems stopping it from
replacing my /etc/resolv.conf file (I'm using a local nameserver).

Now, because dhcpcd is started from ifup, rather than from the startup
scripts, it ignores the contents of /etc/dhcpc/config, so I can't find a way
to add the '-R' switch needed to get it to leave resolv.conf alone.

A friend of mine is using dhcpcd, but he's not having these problems -- he
can't remember what he did to fix it, but we suspect that it might be
because his external interface is eth1, not eth0.  Could this be the case,
or is it a red herring?

I've managed to fix it by hacking on /etc/init.d/dhcpcd to make /sbin/dhcpcd
point to a wrapper script (/sbin/dhcpcd-wrapper), which sources
/etc/dhcpc/config and then runs the relevant dhcpcd-2.x, passing the
options.

I don't particularly like hacking on startup scripts installed by Debian
packages -- it'll come time to upgrade, the package installer will complain,
and I'll have forgotten what I did to get it to work.

Is there a better solution?

Cheers,
Roger.




Reply to: