v1.5 branch refresh based upon upstream master @ c8677ca89e53e3be7988d54280fce166cc894a7e
[librecmc/librecmc.git] / target / linux / sunxi / base-files / lib / preinit / 03_b53_hack.sh
1 #!/bin/sh
2
3 do_b53_hack() {
4         . /lib/functions.sh
5
6         # hack: enable switch on Lamobo R1 and reset counters
7         case "$(board_name)" in
8         "lamobo,lamobo-r1")
9                 ifconfig eth0 up
10                 sleep 1
11                 swconfig dev switch0 set reset 1
12                 swconfig dev switch0 set reset_mib 1
13                 swconfig dev switch0 set apply 1
14                 ;;
15         esac
16 }
17
18 boot_hook_add preinit_main do_b53_hack