brcm63xx: remove obsolote preinit scripts and fix preinit iface script
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>
This commit is contained in:
parent
c69903473b
commit
ec95509af4
4 changed files with 23 additions and 84 deletions
|
@ -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
|
||||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in a new issue