2006-06-27 00:36:13 +00:00
|
|
|
# Copyright (C) 2006 OpenWrt.org
|
|
|
|
|
2006-07-30 03:09:09 +00:00
|
|
|
include network
|
2006-04-13 11:39:20 +00:00
|
|
|
|
2006-07-30 03:09:09 +00:00
|
|
|
addif() {
|
|
|
|
scan_interfaces
|
|
|
|
setup_interface "$INTERFACE"
|
2005-11-19 03:17:20 +00:00
|
|
|
|
2006-07-30 03:09:09 +00:00
|
|
|
# find all vlan configurations for this interface and set them up as well
|
|
|
|
for ifc in $interfaces; do
|
2006-07-30 13:21:18 +00:00
|
|
|
config_get iftype "$ifc" type
|
|
|
|
case "$iftype" in
|
2006-07-30 03:09:09 +00:00
|
|
|
bridge) config_get ifs "$ifc" ifnames;;
|
|
|
|
*) config_get ifs "$ifc" ifname;;
|
|
|
|
esac
|
|
|
|
for dev in $ifs; do
|
|
|
|
[ "${dev%%\.*}" = "$INTERFACE" -a "$dev" != "$INTERFACE" ] && {
|
|
|
|
add_vlan "$dev"
|
2005-11-19 03:17:20 +00:00
|
|
|
}
|
2006-07-30 03:09:09 +00:00
|
|
|
done
|
|
|
|
done
|
2005-11-19 03:17:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
case "$ACTION" in
|
2006-07-30 03:09:09 +00:00
|
|
|
add|register)
|
|
|
|
addif
|
|
|
|
;;
|
2005-11-19 03:17:20 +00:00
|
|
|
esac
|