dhcpcd + vpnc automation?
Roman v. Gemmeren
Tue Sep 01 12:01:49 2009
hi list,
i have been struggling with the new openrc5 which uses a new
network-configuration layout including dhcpcd5.
Currently i have installed dhcpcd-5.0.6.
After some fiddling i came up with a solution to connect via wpa_supplicant
and create a vpn-connection... or so i thought...
The wpa-daemon connects fine to the unencrypted network, and dhcpcd
updates /etc/resolv.conf just fine.
Then i have configured dhcpcd to run the custom script below for the specific
ssid:
dhcpcd.conf:
...
ssid vpnnetwork
script /usr/local/sbin/50-vpn
/usr/local/sbin/50-vpn
#-----
#!/bin/sh
case "$reason" in
"BOUND")
[ -f /var/run/vpnc.pid ] && vpnc-disconnect
vpnc
;;
"STOP")
[ -f /var/run/vpnc.pid ] && vpnc-disconnect
;;
*);;
esac
#-----
But after the script has run /etc/resolv.conf is empty again...
Is dhcpcd somehow preventing vpnc from altering the file, or am i using sth.
wrong?
thx in advance,
Roman
--
"Given the choice between accomplishing something and just lying around,
I'd rather lie around. No contest."
-- Eric Clapton
Archive administrator: postmaster@marples.name