mpc85xx: use the generic board detect
[openwrt/openwrt.git] / target / linux / mpc85xx / base-files / etc / diag.sh
1 #!/bin/sh
2 # Copyright (C) 2013 OpenWrt.org
3
4 . /lib/functions.sh
5 . /lib/functions/leds.sh
6
7 get_status_led() {
8 case $(board_name) in
9 aerohive,hiveap-330)
10 status_led="hiveap-330:green:tricolor0"
11 ;;
12 tplink,tl-wdr4900-v1)
13 status_led="tp-link:blue:system"
14 ;;
15 esac
16 }
17
18 set_state() {
19 get_status_led
20
21 case "$1" in
22 preinit)
23 status_led_blink_preinit
24 ;;
25
26 failsafe)
27 status_led_blink_failsafe
28 ;;
29
30 preinit_regular)
31 status_led_blink_preinit_regular
32 ;;
33
34 done)
35 status_led_on
36 ;;
37 esac
38 }