#!/sbin/runscript # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ depend() { after net before dhcp before apache2 } start() { /usr/sbin/openvpn --mktun --dev tap0 /usr/sbin/openvpn --mktun --dev tap1 /sbin/ifconfig tap0 up /sbin/ifconfig tap1 up /sbin/brctl addbr br0 /sbin/brctl addif br0 eth0.3 /sbin/brctl addif br0 tap0 /sbin/brctl addbr br1 /sbin/brctl addif br1 eth0.4 /sbin/brctl addif br1 tap1 /sbin/ifconfig br0 10.0.251.254 netmask 255.255.254.0 up /sbin/dhcpcd -R -G br1 } stop() { /sbin/ifconfig tap0 down /sbin/ifconfig tap1 down /sbin/ifconfig br1 down /sbin/ifconfig bt0 down /sbin/brctl delbr br0 /sbin/brctl delbr br1 /usr/sbin/openvpn --rmtun --dev tap0 /usr/sbin/openvpn --rmtun --dev tap1 } restart() { svc_stop svc_start }