summaryrefslogtreecommitdiff
path: root/package/base-files/files/lib
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2008-08-01 03:01:25 +0000
committerFelix Fietkau <nbd@openwrt.org>2008-08-01 03:01:25 +0000
commitd98002bd592032d86894ea2170ed11e269f95c95 (patch)
tree0d17ffa2f0ff8fee684c8ab0cef72b508b1bade7 /package/base-files/files/lib
parent8970a1213b9ea35f40ba4d5fedfa2158efcb13d3 (diff)
downloadmtk-20170518-d98002bd592032d86894ea2170ed11e269f95c95.zip
mtk-20170518-d98002bd592032d86894ea2170ed11e269f95c95.tar.gz
mtk-20170518-d98002bd592032d86894ea2170ed11e269f95c95.tar.bz2
avoid duplicate vlan add events
SVN-Revision: 12057
Diffstat (limited to 'package/base-files/files/lib')
-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 b3e9fed..0a74644 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