difos/target/linux/sunxi/base-files/lib/preinit/03_b53_hack.sh
Adrian Schmutzler 356866c481 target: replace remaining occurrences of ifconfig with ip
ifconfig is effectively deprecated for quite some time now. Let's
replace the remaining occurrences for our target setup by the
corresponding ip commands now.

Note that this does not touch ar71xx, as it will be dropped anyway,
and changing it would only make backports harder.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-03 10:42:04 +02:00

16 lines
329 B
Bash

do_b53_hack() {
. /lib/functions.sh
# hack: enable switch on Lamobo R1 and reset counters
case $(board_name) in
lamobo,lamobo-r1)
ip link set eth0 up
sleep 1
swconfig dev switch0 set reset 1
swconfig dev switch0 set reset_mib 1
swconfig dev switch0 set apply 1
;;
esac
}
boot_hook_add preinit_main do_b53_hack