ipq806x: Archer C2600: Renaming LED accordance with the standard
[lede-git/.git] / target / linux / ipq806x / base-files / etc / diag.sh
1 #!/bin/sh
2
3 . /lib/functions/leds.sh
4 . /lib/ipq806x.sh
5
6 get_status_led() {
7         case $(ipq806x_board_name) in
8         c2600)
9                 status_led="c2600:blue:status"
10                 ;;
11         ea8500)
12                 status_led="ea8500:white:power"
13                 ;;
14         esac
15 }
16
17 set_state() {
18         get_status_led
19
20         case "$1" in
21         preinit)
22                 status_led_blink_preinit
23                 ;;
24         failsafe)
25                 status_led_blink_failsafe
26                 ;;
27         preinit_regular)
28                 status_led_blink_preinit_regular
29                 ;;
30         done)
31                 status_led_on
32                 ;;
33         esac
34 }