From 04fe99d30d977b4287c4a0d1ec9dc72bd8418c90 Mon Sep 17 00:00:00 2001 From: cshore Date: Mon, 10 May 2010 17:10:47 +0000 Subject: brcm-2.4: Fixed preinit and failsafe switch configuration git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21417 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../base-files/lib/preinit/05_failsafe_config_switch_brcm | 10 ++++++++++ .../base-files/lib/preinit/15_set_preinit_interface_brcm | 5 +++-- .../brcm-2.4/base-files/lib/preinit/20_failsafe_net_echo | 12 ++++++++++++ 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 target/linux/brcm-2.4/base-files/lib/preinit/05_failsafe_config_switch_brcm create mode 100644 target/linux/brcm-2.4/base-files/lib/preinit/20_failsafe_net_echo (limited to 'target/linux') 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 index 000000000..0bfce5f1e --- /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 + diff --git a/target/linux/brcm-2.4/base-files/lib/preinit/15_set_preinit_interface_brcm b/target/linux/brcm-2.4/base-files/lib/preinit/15_set_preinit_interface_brcm index 1bef26bf0..fdc7c71ca 100644 --- a/target/linux/brcm-2.4/base-files/lib/preinit/15_set_preinit_interface_brcm +++ b/target/linux/brcm-2.4/base-files/lib/preinit/15_set_preinit_interface_brcm @@ -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 } diff --git a/target/linux/brcm-2.4/base-files/lib/preinit/20_failsafe_net_echo b/target/linux/brcm-2.4/base-files/lib/preinit/20_failsafe_net_echo new file mode 100644 index 000000000..f030cb283 --- /dev/null +++ b/target/linux/brcm-2.4/base-files/lib/preinit/20_failsafe_net_echo @@ -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 +} + + -- cgit v1.2.3