2015-04-01 09:42:53 -06:00
|
|
|
#!/bin/sh
|
|
|
|
# Handles setting up rules for tunnel interfaces
|
2015-05-26 00:04:34 -06:00
|
|
|
if [ -x "/usr/sbin/vtund" ]
|
2015-04-07 23:15:36 -06:00
|
|
|
then
|
|
|
|
ISVPN=false
|
|
|
|
case "$INTERFACE" in
|
2015-05-12 18:24:06 -06:00
|
|
|
tun*)
|
2015-04-07 23:15:36 -06:00
|
|
|
ISVPN=true;
|
|
|
|
;;
|
|
|
|
esac
|
2015-04-01 09:42:53 -06:00
|
|
|
|
2015-04-07 23:15:36 -06:00
|
|
|
if [ "$ISVPN" = true ]; then
|
|
|
|
INTF=tun${INTERFACE:3}
|
|
|
|
if [ $ACTION = "ifup" ] ; then
|
|
|
|
/usr/local/bin/vtun_up $INTF up
|
|
|
|
# echo "$INTF up" >> /tmp/vtundscript.log
|
|
|
|
elif [ $ACTION = "ifdown" ] ; then
|
|
|
|
/usr/local/bin/vtun_up $INTF down
|
|
|
|
# echo "$INTF down" >> /tmp/vtundscript.log
|
|
|
|
fi
|
|
|
|
fi
|
2015-05-26 00:04:34 -06:00
|
|
|
fi
|