ramips: fix Argus ATP-52B board and image names
[openwrt/staging/wigyori.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 3g150b | 3g300m | w150m)
13 status_led="tenda:blue:ap"
14 ;;
15 a5-v11)
16 status_led="a5-v11:red:power"
17 ;;
18 ai-br100)
19 status_led="aigale:blue:wlan"
20 ;;
21 ar670w)
22 status_led="ar670w:green:power"
23 ;;
24 ar725w)
25 status_led="ar725w:green:power"
26 ;;
27 awapn2403)
28 status_led="asiarf:green:wps"
29 ;;
30 atp-52b)
31 status_led="atp-52b:green:run"
32 ;;
33 asl26555)
34 status_led="asl26555:green:power"
35 ;;
36 br6524n)
37 status_led="edimax:blue:power"
38 ;;
39 br6425 | br-6475nd)
40 status_led="edimax:green:power"
41 ;;
42 cf-wr800n)
43 status_led="comfast:white:wps"
44 ;;
45 cy-swr1100)
46 status_led="samsung:blue:wps"
47 ;;
48 d105)
49 status_led="d105:red:power"
50 ;;
51 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)
52 status_led="d-link:green:status"
53 ;;
54 dcs-930l-b1)
55 status_led="d-link:red:power"
56 ;;
57 dir-645)
58 status_led="d-link:green:wps"
59 ;;
60 dap-1350)
61 status_led="d-link:blue:power"
62 ;;
63 e1700)
64 status_led="linksys:green:power"
65 ;;
66 esr-9753)
67 status_led="esr-9753:orange:power"
68 ;;
69 f5d8235-v2)
70 status_led="f5d8235v2:blue:router"
71 ;;
72 fonera20n)
73 status_led="fonera20n:green:power"
74 ;;
75 ip2202)
76 status_led="ip2202:green:run"
77 ;;
78 rt-n13u)
79 status_led="rt-n13u:power"
80 ;;
81 hlk-rm04)
82 status_led="hlk-rm04:red:power"
83 ;;
84 ht-tm02)
85 status_led="ht-tm02:blue:wlan"
86 ;;
87 all0239-3g|\
88 hw550-3g)
89 status_led="hw550-3g:green:status"
90 ;;
91 m2m)
92 status_led="m2m:blue:wifi"
93 ;;
94 m3)
95 status_led="m3:blue:status"
96 ;;
97 m4)
98 status_led="m4:blue:status"
99 ;;
100 mlw221|\
101 mlwg2)
102 status_led="kingston:blue:system"
103 ;;
104 mofi3500-3gn)
105 status_led="mofi3500-3gn:green:status"
106 ;;
107 mpr-a1)
108 status_led="hame:red:power"
109 ;;
110 mpr-a2)
111 status_led="hame:red:power"
112 ;;
113 mr-102n)
114 status_led="mr-102n:amber:status"
115 ;;
116 nbg-419n)
117 status_led="nbg-419n:green:power"
118 ;;
119 nw718)
120 status_led="nw718:amber:cpu"
121 ;;
122 omni-emb|\
123 omni-emb-hpm)
124 status_led="emb:green:status"
125 ;;
126 pbr-m1)
127 status_led="pbr-m1:green:sys"
128 ;;
129 psr-680w)
130 status_led="psr-680w:red:wan"
131 ;;
132 pwh2004)
133 status_led="pwh2004:green:power"
134 ;;
135 px4885)
136 status_led="7links:orange:wifi"
137 ;;
138 re6500)
139 status_led="linksys:orange:wifi"
140 ;;
141 rt-n15)
142 status_led="rt-n15:blue:power"
143 ;;
144 rt-n10-plus)
145 status_led="asus:green:wps"
146 ;;
147 rt-n14u | rt-n56u | wl-330n | wl-330n3g)
148 status_led="asus:blue:power"
149 ;;
150 rut5xx)
151 status_led="rut5xx:green:status"
152 ;;
153 sap-g3200u3)
154 status_led="storylink:green:usb"
155 ;;
156 sl-r7205)
157 status_led="sl-r7205:green:status"
158 ;;
159 tew-691gr|\
160 tew-692gr)
161 status_led="trendnet:green:wps"
162 ;;
163 v11st-fe)
164 status_led="v11st-fe:green:status"
165 ;;
166 v22rw-2x2)
167 status_led="v22rw-2x2:green:security"
168 ;;
169 vocore)
170 status_led="vocore:green:status"
171 ;;
172 w306r-v20)
173 status_led="w306r-v20:green:sys"
174 ;;
175 w502u)
176 status_led="alfa:blue:wps"
177 ;;
178 wcr-150gn)
179 status_led="wcr150gn:amber:power"
180 ;;
181 whr-g300n)
182 status_led="whr-g300n:green:router"
183 ;;
184 wmr300)
185 status_led="buffalo:green:status"
186 ;;
187 wli-tx4-ag300n)
188 status_led="buffalo:blue:power"
189 ;;
190 wzr-agl300nh)
191 status_led="buffalo:green:router"
192 ;;
193 wl-351)
194 status_led="wl-351:amber:power"
195 ;;
196 wr512-3gn)
197 status_led="wr512:green:wps"
198 ;;
199 zbt-wr8305rt)
200 status_led="zbt-wr8305rt:sys"
201 ;;
202 whr-300hp2 | \
203 whr-600d | \
204 whr-1166d | \
205 wsr-600 | \
206 wsr-1166)
207 status_led="buffalo:orange:diag"
208 ;;
209 wnce2001)
210 status_led="netgear:green:power"
211 ;;
212 nexx-wt1520)
213 status_led="nexx-wt1520:white:power"
214 ;;
215 wt3020)
216 status_led="nexx:blue:power"
217 ;;
218 mzk-w300nh2)
219 status_led="mzkw300nh2:green:power"
220 ;;
221 ur-326n4g)
222 status_led="ur326:green:wps"
223 ;;
224 ur-336un)
225 status_led="ur336:green:wps"
226 ;;
227 x5)
228 status_led="x5:green:power"
229 ;;
230 x8)
231 status_led="x8:green:power"
232 ;;
233 xdxrn502j)
234 status_led="xdxrn502j:green:power"
235 ;;
236 miwifi-mini)
237 status_led="miwifi-mini:red:status"
238 ;;
239 f7c027)
240 status_led="belkin:orange:status"
241 ;;
242 oy-0001)
243 status_led="oy:green:wifi"
244 ;;
245 na930)
246 status_led="na930:blue:power"
247 ;;
248 y1 | \
249 y1s)
250 status_led="lenovo:blue:power"
251 ;;
252 zte-q7)
253 status_led="zte:red:status"
254 ;;
255 mzk-dp150n)
256 status_led="mzkdp150n:green:power"
257 ;;
258 esac
259 }
260
261 set_state() {
262 get_status_led
263
264 case "$1" in
265 preinit)
266 status_led_blink_preinit
267 ;;
268 failsafe)
269 status_led_blink_failsafe
270 ;;
271 preinit_regular)
272 status_led_blink_preinit_regular
273 ;;
274 done)
275 status_led_on
276 ;;
277 esac
278 }