diff options
author | jow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-03-13 21:15:41 +0000 |
---|---|---|
committer | jow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-03-13 21:15:41 +0000 |
commit | 9bbe7731c60aa44fd23e461ace2a80f2a923e7e8 (patch) | |
tree | cee02d710f976a8dcec99d97dded7315ec1bcca5 /package/switch | |
parent | 0182feb5e7c844a071610aa59defc34e18399c80 (diff) |
[package] switch: the hardware must be up while configuring
Since the removal of the interface coldplug hack the timing changed in such a way that eth0 is not up during switch setup,
leading to an inaccesible device. Bring up the switch interface before configuring it to mitigate the problem.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30937 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/switch')
-rw-r--r-- | package/switch/Makefile | 4 | ||||
-rw-r--r-- | package/switch/files/switch.sh | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/package/switch/Makefile b/package/switch/Makefile index 364416de7..2b036b07d 100644 --- a/package/switch/Makefile +++ b/package/switch/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2011 OpenWrt.org +# Copyright (C) 2006-2012 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=kmod-switch -PKG_RELEASE:=4 +PKG_RELEASE:=5 include $(INCLUDE_DIR)/package.mk diff --git a/package/switch/files/switch.sh b/package/switch/files/switch.sh index 6517ca985..2563d410e 100644 --- a/package/switch/files/switch.sh +++ b/package/switch/files/switch.sh @@ -11,6 +11,7 @@ setup_switch_hw() { local proc="/proc/switch/$dev" [ -d "$proc" ] && { + ifconfig "$dev" up echo "$reset" > "$proc/reset" echo "$evlan" > "$proc/enable_vlan" [ -f "$proc/enable" ] && echo "$enable" > "$proc/enable" |