#!/bin/sh | |
# The following expression selects the first bridge listed by 'brctl show'. | |
# Modify it to suit your needs. | |
switch=$(/usr/sbin/brctl show | awk 'NR==2 { print $1 }') | |
/bin/echo 0 > /proc/sys/net/ipv6/conf/${switch}/disable_ipv6 | |
/sbin/ifconfig $1 0.0.0.0 up | |
/usr/sbin/brctl addif ${switch} $1 | |
/usr/sbin/brctl setfd ${switch} 0 | |
/usr/sbin/brctl stp ${switch} off |