gre: Support fqdn as remote tunnel endpoint
[openwrt/openwrt.git] / target / linux / ramips / base-files / etc / board.d / 01_leds
1 #!/bin/sh
2
3 . /lib/functions/uci-defaults.sh
4 . /lib/ramips.sh
5
6 set_usb_led() {
7 ucidef_set_led_usbdev "usb" "USB" "${1}" "${2:-1-1}"
8 }
9
10 set_wifi_led() {
11 ucidef_set_led_netdev "wifi_led" "wifi" "${1}" "${2:-wlan0}"
12 }
13
14
15 board=$(ramips_board_name)
16
17 board_config_update
18
19 case $board in
20 3g150b|\
21 3g300m)
22 set_usb_led "$board:blue:3g"
23 ;;
24 3g-6200n)
25 set_wifi_led "$board:amber:wlan"
26 set_usb_led "$board:blue:3g"
27 ;;
28 3g-6200nl|\
29 br-6475nd|\
30 mzk-w300nh2)
31 set_wifi_led "$board:amber:wlan"
32 ;;
33 a5-v11|\
34 cs-qr10)
35 ucidef_set_led_default "power" "POWER" "$board:red:power" "1"
36 ;;
37 ai-br100)
38 ucidef_set_led_netdev "wan" "wan" "$board:blue:wan" "eth0.2"
39 set_wifi_led "$board:blue:wlan"
40 ;;
41 air3gii)
42 set_wifi_led "$board:green:wlan"
43 set_usb_led "$board:green:mobile"
44 ;;
45 all0239-3g|\
46 hw550-3g|\
47 mofi3500-3gn|\
48 sap-g3200u3|\
49 sk-wb8|\
50 wf-2881)
51 set_usb_led "$board:green:usb"
52 ;;
53 all0256n)
54 ucidef_set_rssimon "wlan0" "40000" "1"
55 ucidef_set_led_rssi "rssilow" "RSSILOW" "$board:green:rssilow" "wlan0" "1" "40" "0" "6"
56 ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "$board:green:rssimed" "wlan0" "30" "80" "-29" "5"
57 ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "$board:green:rssihigh" "wlan0" "70" "100" "-69" "8"
58 set_wifi_led "rt2800pci-phy0::radio"
59 ;;
60 ar670w|\
61 ar725w|\
62 awapn2403)
63 set_wifi_led "rt2800soc-phy0::radio"
64 ;;
65 asl26555)
66 ucidef_set_led_default "power" "POWER" "$board:green:power" "1"
67 ucidef_set_led_netdev "eth" "ETH" "$board:green:eth" "eth0"
68 set_wifi_led "$board:green:wlan"
69 set_usb_led "$board:green:3g"
70 ;;
71 bc2)
72 set_usb_led "$board:blue:usb"
73 ;;
74 br-6425)
75 set_wifi_led "$board:orange:wlan"
76 ;;
77 broadway)
78 set_usb_led "$board:red:diskmounted"
79 set_wifi_led "$board:red:wps_active"
80 ;;
81 c20i)
82 ucidef_set_led_switch "lan" "lan" "$board:blue:lan" "switch0" "0x1e"
83 ucidef_set_led_switch "wan" "wan" "$board:blue:wan" "switch0" "0x01"
84 set_usb_led "$board:blue:usb" "2-1"
85 ucidef_set_led_wlan "wlan" "wlan" "$board:blue:wlan" "phy0radio"
86 ;;
87 c50)
88 ucidef_set_led_default "power" "power" "$board:blue:power" "0"
89 ucidef_set_led_netdev "lan" "lan" "$board:blue:lan" "eth0.2"
90 set_usb_led "$board:blue:usb"
91 ucidef_set_led_wlan "wlan2g" "wlan2g" "$board:blue:wlan2g" "phy1radio"
92 ucidef_set_led_wlan "wlan5g" "wlan5g" "$board:blue:wlan5g" "phy0radio"
93 ;;
94 cf-wr800n)
95 ucidef_set_led_netdev "lan" "lan" "$board:white:ethernet" eth0.1
96 set_wifi_led "$board:white:wifi"
97 ;;
98 cy-swr1100)
99 ucidef_set_led_default "wps" "WPS" "$board:blue:wps" "0"
100 set_usb_led "$board:blue:usb"
101 ;;
102 d105)
103 ucidef_set_led_default "power" "POWER" "$board:red:power" "1"
104 set_usb_led "$board:green:usb"
105 ;;
106 db-wrt01)
107 ucidef_set_led_default "power" "power" "$board:orange:power" "1"
108 ;;
109 dch-m225)
110 ucidef_set_led_default "power" "POWER" "$board:geeen:power" "1"
111 ucidef_set_led_default "status" "STATUS" "$board:red:status" "0"
112 ;;
113 dcs-930l-b1)
114 ucidef_set_led_default "power" "POWER" "$board:red:power" "1"
115 ucidef_set_led_netdev "wifi" "WiFi" "$board:blue:wps"
116 ;;
117 dir-300-b1|\
118 dir-600-b1|\
119 dir-600-b2|\
120 dir-620-a1)
121 ucidef_set_led_default "wan" "WAN LED (amber)" "$board:amber:wan" "1"
122 set_wifi_led "rt2800pci-phy0::radio"
123 ;;
124 dir-300-b7|\
125 dir-320-b1|\
126 dir-610-a1|\
127 esr-9753|\
128 hlk-rm04|\
129 sl-r7205|\
130 v11st-fe|\
131 w306r-v20|\
132 wt1520)
133 set_wifi_led "rt2800pci-phy0::radio"
134 ;;
135 dir-615-d|\
136 dir-615-h1)
137 ucidef_set_led_default "status" "Status LED (amber)" "$board:amber:status" "0"
138 set_wifi_led "rt2800pci-phy0::radio"
139 ;;
140 dir-620-d1|\
141 mzk-ex300np)
142 set_wifi_led "$board:green:wifi"
143 ;;
144 dir-810l|\
145 mzk-750dhp|\
146 mzk-dp150n)
147 ucidef_set_led_default "power" "power" "$board:green:power" "1"
148 ;;
149 dir-860l-b1)
150 ucidef_set_led_netdev "wan" "wan" "$board:green:net" "eth0.2"
151 ;;
152 ex2700)
153 ucidef_set_led_default "power_r" "POWER (red)" "$board:red:power" "0"
154 set_wifi_led "$board:green:router"
155 ;;
156 f5d8235-v1|\
157 f5d8235-v2)
158 set_usb_led "$board:blue:storage"
159 ;;
160 fonera20n)
161 set_usb_led "$board:orange:usb"
162 set_wifi_led "$board:orange:wifi"
163 ;;
164 gl-mt300a|\
165 gl-mt300n|\
166 gl-mt750)
167 set_wifi_led "$board:wlan"
168 ;;
169 hc5661)
170 ucidef_set_led_default "system" "system" "$board:blue:system" "1"
171 ucidef_set_led_netdev "internet" "internet" "$board:blue:internet" "eth0.2"
172 set_wifi_led "$board:blue:wlan2g"
173 ;;
174 hc5761)
175 ucidef_set_led_default "system" "system" "$board:blue:system" "1"
176 ucidef_set_led_netdev "internet" "internet" "$board:blue:internet" "eth0.2"
177 set_wifi_led "$board:blue:wlan2g"
178 ucidef_set_led_netdev "wifi5g" "wifi5g" "$board:blue:wlan5g" "rai0"
179 ;;
180 hc5861)
181 ucidef_set_led_default "system" "system" "$board:blue:system" "1"
182 ucidef_set_led_netdev "internet" "internet" "$board:blue:internet" "eth0.2"
183 set_wifi_led "$board:blue:wlan2g"
184 ucidef_set_led_netdev "wifi5g" "wifi5g" "$board:blue:wlan5g" "rai0"
185 ucidef_set_led_default "turbo" "turbo" "$board:blue:turbo" "0"
186 ;;
187 hg255d)
188 set_wifi_led "$board:green:wlan"
189 set_usb_led "$board:green:usb"
190 ucidef_set_led_netdev "internet" "internet" "$board:green:internet" "eth0.2"
191 ;;
192 hpm)
193 ucidef_set_led_default "power" "POWER" "$board:orange:power" "1"
194 ucidef_set_led_netdev "eth" "ETH" "$board:green:eth" "eth0"
195 set_wifi_led "$board:green:wifi"
196 ;;
197 ht-tm02)
198 ucidef_set_led_netdev "eth" "Ethernet" "$board:green:lan" "eth0"
199 set_wifi_led "$board:blue:wlan"
200 ;;
201 m2m)
202 set_wifi_led "$board:blue:wifi"
203 ucidef_set_led_netdev "eth" "Ethernet" "$board:green:wan" "eth0"
204 ;;
205 miniembplug)
206 set_wifi_led "$board:red:wlan"
207 set_usb_led "$board:green:mobile"
208 ;;
209 miwifi-mini)
210 ucidef_set_led_default "power" "power" "$board:red:status" "1"
211 ;;
212 miwifi-nano)
213 ucidef_set_led_default "power" "power" "$board:red:status" "1"
214 ucidef_set_led_wlan "radio_led" "radio" "$board:amber:radio" "phy0radio"
215 ucidef_set_led_wlan "wifi_led" "wifi" "$board:blue:wifi" "phy0assoc"
216 ;;
217 mlw221|\
218 mlwg2)
219 set_wifi_led "$board:blue:wifi"
220 ucidef_set_led_default "system" "system" "$board:blue:system" "1"
221 ;;
222 mpr-a1|\
223 mpr-a2)
224 set_wifi_led "$board:blue:system"
225 ;;
226 mr-102n)
227 set_wifi_led "$board:green:wlan"
228 set_usb_led "$board:green:usb"
229 ;;
230 mzk-ex750np)
231 ucidef_set_led_default "power" "power" "$board:red:power" "1"
232 set_wifi_led "$board:red:wifi"
233 ;;
234 na930)
235 set_usb_led "$board:blue:status"
236 ;;
237 newifi-d1)
238 set_usb_led "$board:red:status"
239 ;;
240 nw718)
241 set_usb_led "$board:amber:usb"
242 ;;
243 oy-0001)
244 ucidef_set_led_default "power" "power" "$board:green:power" "1"
245 set_wifi_led "$board:green:wifi"
246 ;;
247 pbr-d1)
248 set_usb_led "$board:orange:usb"
249 ;;
250 pbr-m1)
251 ucidef_set_led_netdev "internet" "internet" "$board:blue:internet" "eth0.2"
252 ucidef_set_led_default "power" "power" "$board:blue:power" "1"
253 ucidef_set_led_default "sys" "sys" "$board:blue:sys" "1"
254 ;;
255 psg1208)
256 set_wifi_led "$board:white:wlan2g"
257 ;;
258 psg1218)
259 ucidef_set_led_default "power" "power" "$board:red:status" "1"
260 ;;
261 px-4885)
262 set_wifi_led "$board:orange:wifi"
263 set_usb_led "$board:blue:storage"
264 ;;
265 re6500)
266 ucidef_set_led_default "power" "power" "$board:white:power" "1"
267 ucidef_set_led_default "wifi" "wifi" "$board:orange:wifi" "1"
268 ;;
269 rp-n53)
270 ucidef_set_led_netdev "eth" "Network" "$board:white:back" "eth0"
271 set_wifi_led "$board:blue:wifi"
272 ;;
273 rt-n14u)
274 ucidef_set_led_default "power" "power" "$board:blue:power" "1"
275 ucidef_set_led_netdev "lan" "lan" "$board:blue:lan" eth0.1
276 ucidef_set_led_netdev "wan" "wan" "$board:blue:wan" eth0.2
277 set_wifi_led "$board:blue:air"
278 set_usb_led "$board:blue:usb"
279 ;;
280 tew-714tru)
281 set_usb_led "$board:red:usb"
282 set_wifi_led "$board:green:wifi"
283 ;;
284 tiny-ac)
285 set_wifi_led "$board:orange:wifi"
286 set_usb_led "$board:green:usb"
287 ;;
288 vocore)
289 ucidef_set_led_netdev "eth" "ETH" "$board:orange:eth" "eth0"
290 set_wifi_led "$board:green:status"
291 ;;
292 w502u)
293 set_usb_led "$board:blue:usb"
294 set_wifi_led "rt2800pci-phy0::radio"
295 ;;
296 wcr-150gn)
297 set_usb_led "$board:amber:user"
298 ;;
299 whr-1166d|\
300 whr-300hp2|\
301 whr-600d)
302 ucidef_set_led_default "power" "power" "$board:green:power" "1"
303 ucidef_set_led_default "router" "router" "$board:green:router" "1"
304 ;;
305 wnce2001)
306 set_wifi_led "$board:green:wlan"
307 ;;
308 wrh-300cr)
309 set_wifi_led "$board:green:wlan"
310 ucidef_set_led_netdev "lan" "lan" "$board:green:ethernet" "eth0"
311 ;;
312 wndr3700v5)
313 ucidef_set_led_default "power" "POWER" "$board:green:power" "0"
314 ;;
315 wt3020)
316 ucidef_set_led_default "power" "power" "$board:blue:power" "0"
317 ;;
318 y1|\
319 y1s)
320 ucidef_set_led_default "power" "power" "$board:blue:power" "1"
321 set_usb_led "$board:blue:usb"
322 set_wifi_led "$board:blue:wifi"
323 ;;
324 zbt-ape522ii)
325 ucidef_set_led_netdev "wlan2g4" "wlan1-link" "$board:green:wlan2g4" "wlan1"
326 ucidef_set_led_netdev "sys1" "wlan1" "$board:green:sys1" "wlan1" "tx rx"
327 ucidef_set_led_netdev "sys2" "wlan0" "$board:green:sys2" "wlan0" "tx rx"
328 ;;
329 zbt-cpe102)
330 ucidef_set_led_default "power" "power" "$board:green:4g-0" "0"
331 ;;
332 zbt-wa05)
333 ucidef_set_led_default "power" "power" "$board:blue:power" "1"
334 set_wifi_led "$board:blue:air"
335 set_usb_led "$board:blue:usb"
336 ;;
337 zbt-we826)
338 ucidef_set_led_default "power" "power" "$board:green:power" "1"
339 set_wifi_led "$board:green:wifi"
340 set_usb_led "$board:green:usb"
341 ;;
342 zbt-wr8305rt)
343 ucidef_set_led_default "power" "power" "$board:green:sys" "1"
344 set_usb_led "$board:green:usb"
345 set_wifi_led "$board:green:wifi"
346 ;;
347 zte-q7)
348 set_wifi_led "$board:blue:status"
349 ;;
350 youku-yk1)
351 ucidef_set_led_default "power" "power" "$board:blue:power" "1"
352 set_wifi_led "$board:blue:air"
353 set_usb_led "$board:blue:usb"
354 ;;
355 esac
356
357 board_config_flush
358
359 exit 0