brcm63xx: remove obsolote preinit scripts and fix preinit iface script
authorÁlvaro Fernández Rojas <noltari@gmail.com>
Thu, 2 Jun 2016 14:12:09 +0000 (16:12 +0200)
committerÁlvaro Fernández Rojas <noltari@gmail.com>
Fri, 3 Jun 2016 14:30:06 +0000 (16:30 +0200)
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 <noltari@gmail.com>
target/linux/brcm63xx/base-files/lib/preinit/05_failsafe_config_switch_brcm63xx [deleted file]
target/linux/brcm63xx/base-files/lib/preinit/05_init_interfaces_brcm63xx
target/linux/brcm63xx/base-files/lib/preinit/15_set_preinit_interface_brcm63xx [deleted file]
target/linux/brcm63xx/base-files/lib/preinit/20_failsafe_net_echo_brcm63xx [deleted file]

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 (file)
index e1653e3..0000000
+++ /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
-
index 7e4dfcb..8aa3225 100644 (file)
@@ -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 (file)
index 7655fb7..0000000
+++ /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 (file)
index f030cb2..0000000
+++ /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
-}
-
-