fix error output of brctl if bridging is not supported.
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 14 Mar 2010 21:10:07 +0000 (21:10 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 14 Mar 2010 21:10:07 +0000 (21:10 +0000)
The following error is displayed during network configuration on any device that has DEVICE_TYPE set to something else then router, or has brctl functionality disabled through some other method:

"brctl: SIOCGIFBR: Package not installed"

This is due to the unbridge function being called, which uses "brctl show" to determine if the interface is bridged.

Signed-off-by: Ithamar R. Adema <ithamar.adema@team-embedded.nl>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20218 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/base-files/files/lib/network/config.sh

index b7d7b259a94d21f0db272c1d530fc47b2e7616c3..e64198b7f69580056be1cb224215e0b35ff3a5f6 100755 (executable)
@@ -337,7 +337,7 @@ unbridge() {
        local brdev
 
        [ -x /usr/sbin/brctl ] || return 0
-       brctl show | grep "$dev" >/dev/null && {
+       brctl show 2>/dev/null | grep "$dev" >/dev/null && {
                # interface is still part of a bridge, correct that
 
                for brdev in $(brctl show | awk '$2 ~ /^[0-9].*\./ { print $1 }'); do