Re: dhcpcd + vpnc automation?
Roman v. Gemmeren
Tue Sep 01 20:56:31 2009
Hi Roy,
Am Tuesday 01 September 2009 22:44:05 schrieb Roy Marples:
> If you use the script option, then none of the supplied hooks will work -
> including the one that sets resolv.conf.
Since the vpnc-script updates /etc/resolv.conf on its own (adding a VPNC-Line
as marker), i think i wouldn't need that hook anyway...
> Maybe you need to create an enter-hook script?
> See dhcpcd-run-hooks(8) for details.
After another hour of fiddling i think i found a solution, for others with the
same problem here is what i found out:
The usual working order of dhcpcd/vpnc would be:
1. bring up eth0/wlan0
2. dhcpcd configures eth0/wlan0
3. script executes vpnc
#now the 2 parts i am not really sure about the order, but because of the
#error i think it is like this:
4. update resolv.conf with nameservers from vpnc
5. create tun0 (which gets reconfigured via dhcpcd)
6. dhcpcd updates /etc/resolv.conf with empty lines
7. vpn is connected but no nameserver configured
So i added the following to dhpcd.conf (probably should disable all hooks on
tun0, but for testing this worked):
interface tun0
nohook resolv.conf
greetings,
Roman
--
It's like deja vu all over again.
-- Yogi Berra
Archive administrator: postmaster@marples.name