save the real configured interface name in the 'device' variable when running scan_in...
[15.05/openwrt.git] / package / base-files / default / etc / hotplug.d / net / 10-net
1 # Copyright (C) 2006 OpenWrt.org
2
3 include /lib/network
4
5 addif() {
6         scan_interfaces
7         setup_interface "$INTERFACE"
8
9         # find all vlan configurations for this interface and set them up as well
10         for ifc in $interfaces; do
11                 config_get iftype "$ifc" type
12                 config_get ifs "$ifc" device
13                 for dev in $ifs; do
14                         [ "${dev%%\.*}" = "$INTERFACE" -a "$dev" != "$INTERFACE" ] && {
15                                 add_vlan "$dev"
16                         }
17                 done
18         done
19 }
20
21 case "$ACTION" in
22         add|register)
23                 case "$PHYSDEVDRIVER" in
24                         natsemi) sleep 1;;
25                 esac
26                 addif
27         ;;
28 esac