projects
/
openwrt
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
brcm-2.4: Fixed preinit and failsafe switch configuration
[openwrt/openwrt.git]
/
target
/
linux
/
brcm-2.4
/
base-files
/
lib
/
preinit
/
05_failsafe_config_switch_brcm
diff --git a/target/linux/brcm-2.4/base-files/lib/preinit/05_failsafe_config_switch_brcm
b/target/linux/brcm-2.4/base-files/lib/preinit/05_failsafe_config_switch_brcm
new file mode 100644
(file)
index 0000000..
0bfce5f
--- /dev/null
+++ b/
target/linux/brcm-2.4/base-files/lib/preinit/05_failsafe_config_switch_brcm
@@ -0,0
+1,10
@@
+#!/bin/sh
+
+failsafe_config_switch() {
+ [ -d /proc/switch/eth0 ] && [ "$ifname" = "eth0" ] && {
+ echo "0 1 2 3 4 ${cpu_port:-5u*}" > /proc/switch/eth0/vlan/0/ports
+ }
+}
+
+boot_hook_add failsafe failsafe_config_switch
+