module-tinc/templates/tinc-up.erb
2010-10-22 16:15:28 -05:00

11 lines
373 B
Text

#!/bin/sh
grep <%= real_tinc_bridge_interface %> /proc/net/dev | awk -F: '{ print $1 }' | grep -q <%= real_tinc_bridge_interface %>
if [ $? -gt 0 ]; then
brctl addbr <%= real_tinc_bridge_interface %>
ifconfig bridge <%= real_tinc_ip %> netmask 255.255.0.0
fi
ifconfig $INTERFACE 0.0.0.0
brctl addif <%= real_tinc_bridge_interface %> $INTERFACE
ifconfig $INTERFACE up