mirror of https://github.com/OpenIPC/firmware.git
35 lines
629 B
Bash
Executable File
35 lines
629 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# You don't usually need to touch this file at all, the full configuration
|
|
# of the bridge can be done in a standard way on /etc/network/interfaces.
|
|
|
|
# Have a look at /usr/share/doc/bridge-utils/README.Debian.gz if you want
|
|
# more info about the way on wich a bridge is set up on Debian.
|
|
|
|
if [ ! -x /usr/sbin/brctl ]
|
|
then
|
|
exit 0
|
|
fi
|
|
|
|
case "$IF_BRIDGE_PORTS" in
|
|
"")
|
|
exit 0
|
|
;;
|
|
none)
|
|
INTERFACES=""
|
|
;;
|
|
all)
|
|
INTERFACES=`grep eth /proc/net/dev|sed 's/\(\ *\)\(eth[^:]*\)\(.*\)/\2/'`
|
|
;;
|
|
*)
|
|
INTERFACES="$IF_BRIDGE_PORTS"
|
|
;;
|
|
esac
|
|
|
|
brctl delbr $IFACE
|
|
|
|
for i in $INTERFACES
|
|
do
|
|
ip link set $i down
|
|
done
|