From: <abe...@us...> - 2016-11-04 21:44:23
|
Revision: 7925 http://sourceforge.net/p/astlinux/code/7925 Author: abelbeck Date: 2016-11-04 21:44:20 +0000 (Fri, 04 Nov 2016) Log Message: ----------- No longer use brctl for managing bridge interfaces, instead use iproute2 tools Modified Paths: -------------- branches/1.0/project/astlinux/target_skeleton/etc/init.d/network Modified: branches/1.0/project/astlinux/target_skeleton/etc/init.d/network =================================================================== --- branches/1.0/project/astlinux/target_skeleton/etc/init.d/network 2016-11-04 16:17:05 UTC (rev 7924) +++ branches/1.0/project/astlinux/target_skeleton/etc/init.d/network 2016-11-04 21:44:20 UTC (rev 7925) @@ -384,31 +384,28 @@ #BRIDGES if [ -n "$BRIDGE0" ]; then modprobe bridge - brctl addbr br0 - brctl setfd br0 0 + ip link add name br0 type bridge for i in $BRIDGE0; do ip link set dev $i up - brctl addif br0 $i + ip link set dev $i master br0 done fi if [ -n "$BRIDGE1" ]; then modprobe bridge - brctl addbr br1 - brctl setfd br1 0 + ip link add name br1 type bridge for i in $BRIDGE1; do ip link set dev $i up - brctl addif br1 $i + ip link set dev $i master br1 done fi if [ -n "$BRIDGE2" ]; then modprobe bridge - brctl addbr br2 - brctl setfd br2 0 + ip link add name br2 type bridge for i in $BRIDGE2; do ip link set dev $i up - brctl addif br2 $i + ip link set dev $i master br2 done fi @@ -768,17 +765,29 @@ #BRIDGES if [ -n "$BRIDGE0" ]; then ip link set dev br0 down - brctl delbr br0 + for i in $BRIDGE0; do + ip link set dev $i nomaster + ip link set dev $i down + done + ip link delete br0 type bridge fi if [ -n "$BRIDGE1" ]; then ip link set dev br1 down - brctl delbr br1 + for i in $BRIDGE1; do + ip link set dev $i nomaster + ip link set dev $i down + done + ip link delete br1 type bridge fi if [ -n "$BRIDGE2" ]; then ip link set dev br2 down - brctl delbr br2 + for i in $BRIDGE2; do + ip link set dev $i nomaster + ip link set dev $i down + done + ip link delete br2 type bridge fi #VLANS This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |