X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/777e76abb47dd74816ea063c471359b0db3aa2e7..a74090f6c1a519f362ba4ec5b5dc2a82ff6cc765:/package/base-files/default/etc/hotplug.d/net/10-net?ds=sidebyside diff --git a/package/base-files/default/etc/hotplug.d/net/10-net b/package/base-files/default/etc/hotplug.d/net/10-net index 19f53abd7..fb7b128ea 100644 --- a/package/base-files/default/etc/hotplug.d/net/10-net +++ b/package/base-files/default/etc/hotplug.d/net/10-net @@ -7,11 +7,19 @@ setup_eth() iwconfig "$INTERFACE" 2>&- | grep -v 'no wireless' >&- && { /sbin/wifi } + [ -d /proc/switch ] || { + insmod switch-core + insmod switch-robo || insmod switch-adm + } if="$(echo "$INTERFACE" | sed s,eth,et,)" ifconfig "$INTERFACE" up 2>&- >&- for vlan in $(seq 0 15); do - [ "$(nvram get vlan${vlan}hwname)" = "$if" ] && \ + [ "$(nvram get vlan${vlan}hwname)" = "$if" ] && { $DEBUG vconfig add "$INTERFACE" "$vlan" + vports="$(nvram get vlan${vlan}ports)" + [ \! -z "$vports" -a -d "/proc/switch/$INTERFACE" ] && \ + echo "$vports" > "/proc/switch/$INTERFACE/vlan/$vlan/ports" + } done } @@ -184,6 +192,6 @@ do_unregister() { } case "$ACTION" in - register) do_register;; - unregister) do_unregister;; + add|register) do_register;; + remove|unregister) do_unregister;; esac