mvebu: Configure status LED for WRT1900ACS
[openwrt/openwrt.git] / target / linux / mvebu / base-files / etc / diag.sh
1 #!/bin/sh
2 # Copyright (C) 2014 OpenWrt.org
3
4 . /lib/functions/leds.sh
5 . /lib/mvebu.sh
6
7 get_status_led() {
8 case $(mvebu_board_name) in
9 armada-385-linksys-shelby)
10 status_led="shelby:white:power"
11 ;;
12 armada-xp-linksys-mamba)
13 status_led="mamba:white:power"
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 failsafe)
26 status_led_blink_failsafe
27 ;;
28 preinit_regular)
29 status_led_blink_preinit_regular
30 ;;
31 done)
32 status_led_on
33 ;;
34 esac
35 }