version 1.1, 2011/07/05 23:43:00
|
version 1.3, 2017/02/13 16:52:47
|
Line 2
|
Line 2
|
|
|
IFACE="bridge0" |
IFACE="bridge0" |
|
|
BRIDGED="fxp0 rl0 wlan0 wlan1" | BRIDGED="em0 rl0 wlan0" |
STP="fxp rl0" | STP="em0 rl0" |
|
|
|
OPTS="" |
|
#IP="auto" |
|
IP="" |
|
ALIASES="" |
|
#IP6="auto" |
|
IP6="" |
|
ALIASES6="" |
|
|
|
[ -z "$IFACE" ] && exit |
|
|
echo "Config Bridge interface $IFACE ..." |
echo "Config Bridge interface $IFACE ..." |
|
|
ifconfig $IFACE create | ifconfig $IFACE create || exit |
| |
for i in $BRIDGED; do |
for i in $BRIDGED; do |
ifconfig $IFACE addm $i |
ifconfig $IFACE addm $i |
done |
done |
for i in $STP; do |
for i in $STP; do |
ifconfig $IFACE stp $i |
ifconfig $IFACE stp $i |
done |
done |
ifconfig $IFACE up | |
| if [ -n "$IP" ]; then |
| if [ "$IP" = "auto" ]; then |
| dhclient $IFACE |
| else |
| ifconfig $IFACE inet $IP |
| fi |
| fi |
| for i in $ALIASES; do |
| ifconfig $IFACE inet alias $i |
| done |
| if [ -n "$IP6" ]; then |
| if [ "$IP" = "auto" ]; then |
| ifconfig $IFACE accept_rtadv |
| else |
| ifconfig $IFACE inet6 $IP6 |
| fi |
| fi |
| for i in $ALIASES6; do |
| ifconfig $IFACE inet6 alias $i |
| done |
| |
| ifconfig $IFACE $OPTS up |