2010-08-31 17:54:24 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2010-10-22 23:15:28 +02:00
|
|
|
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 %>
|
2010-12-29 22:44:26 +01:00
|
|
|
ifconfig <%= tinc_internal_interface %> 0.0.0.0
|
2010-10-23 07:01:14 +02:00
|
|
|
ifconfig <%= real_tinc_bridge_interface %> <%= real_tinc_internal_ip %> netmask 255.255.255.0
|
2010-12-29 22:44:26 +01:00
|
|
|
brctl addif <%= real_tinc_bridge_interface %> <%= tinc_internal_interface %>
|
|
|
|
ifconfig <%= tinc_internal_interface %> up
|
2010-10-22 23:15:28 +02:00
|
|
|
fi
|
2010-08-31 17:54:24 +02:00
|
|
|
|
2010-10-22 23:15:28 +02:00
|
|
|
ifconfig $INTERFACE 0.0.0.0
|
|
|
|
brctl addif <%= real_tinc_bridge_interface %> $INTERFACE
|
|
|
|
ifconfig $INTERFACE up
|
2013-08-10 14:58:21 +02:00
|
|
|
<% if override_mtu -%>
|
2013-08-10 15:05:19 +02:00
|
|
|
ifconfig $INTERFACE mtu <%= override_mtu.to_i %>
|
2013-08-10 14:58:21 +02:00
|
|
|
<% end -%>
|