From ec95509af426cf58652355e3276d23f157f327bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Thu, 2 Jun 2016 16:12:09 +0200 Subject: brcm63xx: remove obsolote preinit scripts and fix preinit iface script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These scripts were causing ip issues in the latest version of LEDE: https://gist.github.com/Noltari/6d20d8bcbe236caf516c0a73f5477d00 Fixes preinit iface script by making eth0 the default ifname and only changing it to eth1 for the devices that specifically need it. Signed-off-by: Álvaro Fernández Rojas --- .../lib/preinit/05_failsafe_config_switch_brcm63xx | 10 ---- .../lib/preinit/05_init_interfaces_brcm63xx | 58 +++++++++------------- .../lib/preinit/15_set_preinit_interface_brcm63xx | 27 ---------- .../lib/preinit/20_failsafe_net_echo_brcm63xx | 12 ----- 4 files changed, 23 insertions(+), 84 deletions(-) delete mode 100644 target/linux/brcm63xx/base-files/lib/preinit/05_failsafe_config_switch_brcm63xx delete mode 100644 target/linux/brcm63xx/base-files/lib/preinit/15_set_preinit_interface_brcm63xx delete mode 100644 target/linux/brcm63xx/base-files/lib/preinit/20_failsafe_net_echo_brcm63xx (limited to 'target/linux/brcm63xx/base-files/lib') diff --git a/target/linux/brcm63xx/base-files/lib/preinit/05_failsafe_config_switch_brcm63xx b/target/linux/brcm63xx/base-files/lib/preinit/05_failsafe_config_switch_brcm63xx deleted file mode 100644 index e1653e3936..0000000000 --- a/target/linux/brcm63xx/base-files/lib/preinit/05_failsafe_config_switch_brcm63xx +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -failsafe_ip() { - [ -n "$pi_ifname" ] && grep -q "$pi_ifname" /proc/net/dev && { - ifconfig $pi_ifname $pi_ip netmask $pi_netmask broadcast $pi_broadcast up - } -} - -boot_hook_add failsafe failsafe_ip - diff --git a/target/linux/brcm63xx/base-files/lib/preinit/05_init_interfaces_brcm63xx b/target/linux/brcm63xx/base-files/lib/preinit/05_init_interfaces_brcm63xx index 7e4dfcb2e0..8aa3225ec6 100644 --- a/target/linux/brcm63xx/base-files/lib/preinit/05_init_interfaces_brcm63xx +++ b/target/linux/brcm63xx/base-files/lib/preinit/05_init_interfaces_brcm63xx @@ -4,45 +4,33 @@ set_preinit_iface() { case "$(brcm63xx_board_name)" in - a4001n |\ - a4001n1 |\ - ar-5381u |\ - ar-5387un |\ - bcm963281tan |\ - bcm96328avng |\ - cpva642 |\ - ct536_ct5621 |\ - cvg834g |\ - dgnd3700v1_dgnd3800b |\ - dsl-2640b-b |\ - dsl-274xb-c |\ - dsl-274xb-f |\ - dsl-275xb-d |\ - fast2504n |\ - fast2704v2 |\ - hg553 |\ - hg556a_* |\ - hg520 |\ - hg622 |\ - neufbox6 |\ - p870hw-51a_v2 |\ - rta770bw |\ - rta770w |\ - spw303v |\ - spw500v |\ - v2110 |\ - vr-3025un |\ - vr-3025u |\ - vr-3026e |\ - wap-5813n) - ifname=eth0 - ;; + agpf-s0 |\ bcm96348gw |\ + bcm96348gw-10 |\ bcm96348gw-11 |\ - gw6000 |\ - gw6200) + bcm96358vw |\ + bcm96358vw2 |\ + cpva502p |\ + dg834gt |\ + dmv-s0 |\ + dsl-2650u |\ + dv-201amr |\ + dva-g3810bn |\ + f5d7633 |\ + fast2404 |\ + hg520 |\ + magic |\ + neufbox4 |\ + rg100a |\ + rta1025W |\ + td-w8900gb |\ + usr9108 |\ + v2500v_bb) ifname=eth1 ;; + *) + ifname=eth0 + ;; esac } diff --git a/target/linux/brcm63xx/base-files/lib/preinit/15_set_preinit_interface_brcm63xx b/target/linux/brcm63xx/base-files/lib/preinit/15_set_preinit_interface_brcm63xx deleted file mode 100644 index 7655fb7d53..0000000000 --- a/target/linux/brcm63xx/base-files/lib/preinit/15_set_preinit_interface_brcm63xx +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh - -port_net_echo() { - [ -n "$pi_ifname" ] && grep -q "$pi_ifname" /proc/net/dev && { - if [ "$pi_preinit_net_messages" = "y" ] || [ "$pi_failsafe_net_message" = "true" ] && [ "$pi_preinit_no_failsafe_netmsg" != "y" ]; then - netmsg $pi_broadcast "$1" - fi - } -} - -preinit_ip_deconfig() { - if [ -z "$pi_ifname" ]; then - ifconfig $ifname 0.0.0.0 down - else - grep -q "$pi_ifname" /proc/net/dev && { - ifconfig $pi_ifname 0.0.0.0 down - } - fi -} - -preinit_net_echo() { - preinit_ip - - port_net_echo $1 -} - - diff --git a/target/linux/brcm63xx/base-files/lib/preinit/20_failsafe_net_echo_brcm63xx b/target/linux/brcm63xx/base-files/lib/preinit/20_failsafe_net_echo_brcm63xx deleted file mode 100644 index f030cb2837..0000000000 --- a/target/linux/brcm63xx/base-files/lib/preinit/20_failsafe_net_echo_brcm63xx +++ /dev/null @@ -1,12 +0,0 @@ -#!/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