#!/bin/sh

echo bridge > /etc/netconfig

echo Setting up bridging...
/usr/sbin/brctl addbr br0
/usr/sbin/brctl stp br0 off
# Despite spanning tree being off, the bridge will
# still wait around on startup for the times controlled
# by the stp parameters. D'oh!
/usr/sbin/brctl setfd br0 1
/usr/sbin/brctl sethello br0 1  


iface=`ifconfig  -a | grep eth0`
if [ "$iface" != "" ]; then
        ifconfig eth0 0.0.0.0
        /usr/sbin/brctl addif br0 eth0
fi

iface=`ifconfig  -a | grep eth1`
if [ "$iface" != "" ]; then
        ifconfig eth1 0.0.0.0
        /usr/sbin/brctl addif br0 eth1
fi
ifconfig br0 192.168.86.22
