kirkwood: add pogoplug v4
[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 seagate,dockstar|\
10 seagate,goflexhome|\
11 seagate,goflexnet)
12 status_led="status:orange:fault"
13 ;;
14 cloudengines,pogoe02)
15 status_led="pogo_e02:orange:fault"
16 ;;
17 cloudengines,pogoplugv4)
18 status_led="pogoplugv4:green:health"
19 ;;
20 linksys,audi)
21 status_led="audi:green:power"
22 ;;
23 linksys,viper)
24 status_led="viper:white:health"
25 ;;
26 zyxel,nsa310b)
27 status_led="nsa310:green:sys"
28 ;;
29 cisco,on100)
30 status_led="on100:green:health"
31 ;;
32 esac
33 }
34
35 set_state() {
36 get_status_led
37
38 case "$1" in
39 preinit)
40 status_led_blink_preinit
41 ;;
42 failsafe)
43 status_led_blink_failsafe
44 ;;
45 preinit_regular)
46 status_led_blink_preinit_regular
47 ;;
48 done)
49 status_led_on
50 ;;
51 esac
52 }