kirkwood: fix HDD LED labels for Zyxel NSA325 in 01_leds
[openwrt/openwrt.git] / target / linux / kirkwood / base-files / etc / diag.sh
1 #!/bin/sh
2 # Copyright (C) 2014 OpenWrt.org
3
4 . /lib/functions.sh
5 . /lib/functions/leds.sh
6
7 get_status_led() {
8 case $(board_name) in
9 cisco,on100)
10 status_led="on100:green:health"
11 ;;
12 cloudengines,pogoe02)
13 status_led="pogo_e02:orange:fault"
14 ;;
15 cloudengines,pogoplugv4)
16 status_led="pogoplugv4:green:health"
17 ;;
18 iom,ix2-200)
19 status_led="status:white:power_led"
20 ;;
21 linksys,audi)
22 status_led="audi:green:power"
23 ;;
24 linksys,viper)
25 status_led="viper:white:health"
26 ;;
27 seagate,dockstar|\
28 seagate,goflexhome|\
29 seagate,goflexnet)
30 status_led="status:orange:fault"
31 ;;
32 zyxel,nsa310b)
33 status_led="nsa310:green:sys"
34 ;;
35 esac
36 }
37
38 set_state() {
39 get_status_led
40
41 case "$1" in
42 preinit)
43 status_led_blink_preinit
44 ;;
45 failsafe)
46 status_led_blink_failsafe
47 ;;
48 preinit_regular)
49 status_led_blink_preinit_regular
50 ;;
51 done)
52 status_led_on
53 ;;
54 esac
55 }