summaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2008-08-01 03:01:25 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2008-08-01 03:01:25 +0000
commit1f75fe411e6b949b0bc6c651aecd319ca110a468 (patch)
treea3039aab194852fa4cb1d1749d56fb101ee14770 /package
parent7ba36c94c218514a2536d3ef1f969bb9ff4f8d02 (diff)
avoid duplicate vlan add events
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12057 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rwxr-xr-xpackage/base-files/files/lib/network/config.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/package/base-files/files/lib/network/config.sh b/package/base-files/files/lib/network/config.sh
index b3e9fed3f..0a7464495 100755
--- a/package/base-files/files/lib/network/config.sh
+++ b/package/base-files/files/lib/network/config.sh
@@ -61,7 +61,9 @@ add_vlan() {
[ "$1" = "$vif" ] || ifconfig "$1" >/dev/null 2>/dev/null || {
ifconfig "$vif" up 2>/dev/null >/dev/null || add_vlan "$vif"
$DEBUG vconfig add "$vif" "${1##*\.}"
+ return 0
}
+ return 1
}
# sort the device list, drop duplicates
@@ -94,7 +96,7 @@ prepare_interface() {
}
# Setup VLAN interfaces
- add_vlan "$iface"
+ add_vlan "$iface" && return 1
ifconfig "$iface" 2>/dev/null >/dev/null || return 0
# Setup bridging