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