1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-01-27 16:11:06 +02:00

avoid duplicate vlan add events

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12057 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2008-08-01 03:01:25 +00:00
parent 7ba36c94c2
commit 1f75fe411e

View File

@ -61,7 +61,9 @@ add_vlan() {
[ "$1" = "$vif" ] || ifconfig "$1" >/dev/null 2>/dev/null || { [ "$1" = "$vif" ] || ifconfig "$1" >/dev/null 2>/dev/null || {
ifconfig "$vif" up 2>/dev/null >/dev/null || add_vlan "$vif" ifconfig "$vif" up 2>/dev/null >/dev/null || add_vlan "$vif"
$DEBUG vconfig add "$vif" "${1##*\.}" $DEBUG vconfig add "$vif" "${1##*\.}"
return 0
} }
return 1
} }
# sort the device list, drop duplicates # sort the device list, drop duplicates
@ -94,7 +96,7 @@ prepare_interface() {
} }
# Setup VLAN interfaces # Setup VLAN interfaces
add_vlan "$iface" add_vlan "$iface" && return 1
ifconfig "$iface" 2>/dev/null >/dev/null || return 0 ifconfig "$iface" 2>/dev/null >/dev/null || return 0
# Setup bridging # Setup bridging