Skip to content

Commit

Permalink
brcm-2.4: Fixed preinit and failsafe switch configuration
Browse files Browse the repository at this point in the history
SVN-Revision: 21417
  • Loading branch information
Daniel Dickinson committed May 10, 2010
1 parent 0910a01 commit 3b7e21a
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5 deletions.
3 changes: 0 additions & 3 deletions .gitignore
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
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

Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ preinit_net_echo() {
echo "$port ${cpu_port:-5u*}" > /proc/switch/eth0/vlan/0/ports
port_net_echo $1
}; done

echo "0 ${cpu_port:-5u*}" > /proc/switch/eth0/vlan/0/ports

} || port_net_echo $1

preinit_ip_deconfig
}


12 changes: 12 additions & 0 deletions target/linux/brcm-2.4/base-files/lib/preinit/20_failsafe_net_echo
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
}


0 comments on commit 3b7e21a

Please sign in to comment.