ralink: add support for dalink dcs930l ipcam
[openwrt/svn-archive/archive.git] / target / linux / ramips / base-files / etc / diag.sh
1 #!/bin/sh
2 # Copyright (C) 2010-2013 OpenWrt.org
3
4 . /lib/functions/leds.sh
5 . /lib/ramips.sh
6
7 get_status_led() {
8 case $(ramips_board_name) in
9 3g-6200n)
10 status_led="edimax:green:power"
11 ;;
12 3g300m | w150m)
13 status_led="tenda:blue:ap"
14 ;;
15 argus-atp52b)
16 status_led="argus-atp52b:green:run"
17 ;;
18 asl26555)
19 status_led="asl26555:green:power"
20 ;;
21 br6524n)
22 status_led="edimax:blue:power"
23 ;;
24 br6425)
25 status_led="edimax:green:power"
26 ;;
27 d105)
28 status_led="d105:red:power"
29 ;;
30 dcs-930 | dir-300-b1 | dir-600-b1 | dir-600-b2 | dir-610-a1 | dir-615-h1 | dir-615-d | dir-620-a1| dir-620-d1| dir-300-b7| dir-320-b1)
31 status_led="d-link:green:status"
32 ;;
33 dir-645)
34 status_led="d-link:green:wps"
35 ;;
36 dap-1350)
37 status_led="d-link:blue:power"
38 ;;
39 esr-9753)
40 status_led="esr-9753:orange:power"
41 ;;
42 f5d8235-v2)
43 status_led="f5d8235v2:blue:router"
44 ;;
45 fonera20n)
46 status_led="fonera20n:green:power"
47 ;;
48 ip2202)
49 status_led="ip2202:green:run"
50 ;;
51 rt-n13u)
52 status_led="rt-n13u:power"
53 ;;
54 all0239-3g|\
55 hw550-3g)
56 status_led="hw550-3g:green:status"
57 ;;
58 m3)
59 status_led="m3:blue:status"
60 ;;
61 m4)
62 status_led="m4:blue:status"
63 ;;
64 mofi3500-3gn)
65 status_led="mofi3500-3gn:green:status"
66 ;;
67 mpr-a1)
68 status_led="mpr-a1:red:power"
69 ;;
70 mpr-a2)
71 status_led="mpr-a2:red:power"
72 ;;
73 nbg-419n)
74 status_led="nbg-419n:green:power"
75 ;;
76 nw718)
77 status_led="nw718:amber:cpu"
78 ;;
79 omni-emb|\
80 omni-emb-hpm)
81 status_led="emb:green:status"
82 ;;
83 psr-680w)
84 status_led="psr-680w:red:wan"
85 ;;
86 pwh2004)
87 status_led="pwh2004:green:power"
88 ;;
89 rt-n15)
90 status_led="rt-n15:blue:power"
91 ;;
92 rt-n10-plus)
93 status_led="asus:green:wps"
94 ;;
95 rt-n56u | wl-330n | wl-330n3g)
96 status_led="asus:blue:power"
97 ;;
98 sl-r7205)
99 status_led="sl-r7205:green:status"
100 ;;
101 tew-691gr|\
102 tew-692gr)
103 status_led="trendnet:green:wps"
104 ;;
105 v11st-fe)
106 status_led="v11st-fe:green:status"
107 ;;
108 v22rw-2x2)
109 status_led="v22rw-2x2:green:security"
110 ;;
111 w306r-v20)
112 status_led="w306r-v20:green:sys"
113 ;;
114 w502u)
115 status_led="alfa:blue:wps"
116 ;;
117 wcr-150gn)
118 status_led="wcr150gn:amber:power"
119 ;;
120 whr-g300n)
121 status_led="whr-g300n:green:router"
122 ;;
123 wli-tx4-ag300n)
124 status_led="buffalo:blue:power"
125 ;;
126 wl-351)
127 status_led="wl-351:amber:power"
128 ;;
129 wr512-3gn)
130 status_led="wr512:green:wps"
131 ;;
132 wnce2001)
133 status_led="netgear:green:power"
134 ;;
135 mzk-w300nh2)
136 status_led="mzkw300nh2:green:power"
137 ;;
138 ur-326n4g)
139 status_led="ur326:green:wps"
140 ;;
141 ur-336un)
142 status_led="ur336:green:wps"
143 ;;
144 x5)
145 status_led="x5:green:power"
146 ;;
147 x8)
148 status_led="x8:green:power"
149 ;;
150 xdxrn502j)
151 status_led="xdxrn502j:green:power"
152 ;;
153 f7c027)
154 status_led="belkin:orange:status"
155 ;;
156 esac
157 }
158
159 set_state() {
160 get_status_led
161
162 case "$1" in
163 preinit)
164 status_led_blink_preinit
165 ;;
166 failsafe)
167 status_led_blink_failsafe
168 ;;
169 done)
170 status_led_on
171 ;;
172 esac
173 }