1#! /bin/sh 2 3BR=${1:-"br549"} 4ETH=${2:-"eth0"} 5 6# fetch ip of working eth0 7IP=`/sbin/ifconfig $ETH | sed -n -e 's/^.*inet addr:\([0-9][0-9\.]*\).*$/\1/p'` 8echo "Using IP address $IP" 9 10ifconfig $ETH 0.0.0.0 11brctl addbr $BR 12brctl addif $BR $ETH 13ifconfig $BR $IP 14