forked from LiBwrt/openwrt-6.x
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
brcm-2.4: Fixed preinit and failsafe switch configuration
SVN-Revision: 21417
- Loading branch information
Daniel Dickinson
committed
May 10, 2010
1 parent
0910a01
commit 3b7e21a
Showing
4 changed files
with
25 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,12 @@ | ||
.*.swp | ||
/env | ||
/dl | ||
/.config | ||
/.config.old | ||
/bin | ||
/build_dir | ||
/staging_dir | ||
/tmp | ||
/logs | ||
/feeds | ||
/feeds.conf | ||
/files | ||
/package/feeds | ||
/package/openwrt-packages |
10 changes: 10 additions & 0 deletions
10
target/linux/brcm-2.4/base-files/lib/preinit/05_failsafe_config_switch_brcm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
target/linux/brcm-2.4/base-files/lib/preinit/20_failsafe_net_echo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/sh | ||
|
||
indicate_failsafe() { | ||
preinit_net_echo() { | ||
port_net_echo $1 | ||
} | ||
echo "- failsafe -" | ||
preinit_net_echo "Entering Failsafe!\n" | ||
indicate_failsafe_led | ||
} | ||
|
||
|