You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
658 B
36 lines
658 B
19 years ago
|
# Copyright (C) 2006 OpenWrt.org
|
||
|
|
||
18 years ago
|
include /lib/network
|
||
19 years ago
|
|
||
19 years ago
|
addif() {
|
||
|
scan_interfaces
|
||
18 years ago
|
local cfg="$(find_config "$INTERFACE")"
|
||
|
|
||
|
# check the autoload setting
|
||
|
config_get auto "$cfg" auto
|
||
|
case "$auto" in
|
||
|
1|on|enabled) setup_interface "$INTERFACE";;
|
||
|
esac
|
||
|
|
||
18 years ago
|
|
||
19 years ago
|
# find all vlan configurations for this interface and set them up as well
|
||
|
for ifc in $interfaces; do
|
||
19 years ago
|
config_get iftype "$ifc" type
|
||
18 years ago
|
config_get ifs "$ifc" device
|
||
19 years ago
|
for dev in $ifs; do
|
||
|
[ "${dev%%\.*}" = "$INTERFACE" -a "$dev" != "$INTERFACE" ] && {
|
||
|
add_vlan "$dev"
|
||
19 years ago
|
}
|
||
19 years ago
|
done
|
||
|
done
|
||
19 years ago
|
}
|
||
|
|
||
|
case "$ACTION" in
|
||
19 years ago
|
add|register)
|
||
18 years ago
|
case "$PHYSDEVDRIVER" in
|
||
|
natsemi) sleep 1;;
|
||
|
esac
|
||
19 years ago
|
addif
|
||
|
;;
|
||
19 years ago
|
esac
|