kirkwood: Seagate GoFlex Net
[openwrt.git] / target / linux / kirkwood / base-files / etc / diag.sh
1 #!/bin/sh
2 # Copyright (C) 2014 OpenWrt.org
3
4 . /lib/functions/leds.sh
5 . /lib/kirkwood.sh
6
7 get_status_led() {
8         case $(kirkwood_board_name) in
9         dockstar|\
10         goflexnet|\
11         pogo_e02)
12                 status_led="status:orange:fault"
13                 ;;
14         ea4500)
15                 status_led="ea4500:white:health"
16                 ;;
17         esac
18 }
19
20 set_state() {
21         get_status_led
22
23         case "$1" in
24         preinit)
25                 status_led_blink_preinit
26                 ;;
27         failsafe)
28                 status_led_blink_failsafe
29                 ;;
30         preinit_regular)
31                 status_led_blink_preinit_regular
32                 ;;
33         done)
34                 status_led_on
35                 ;;
36         esac
37 }