2010-04-11 17:47:23 +00:00
|
|
|
#!/bin/sh
|
2013-02-18 09:56:29 +00:00
|
|
|
# Copyright (C) 2010-2013 OpenWrt.org
|
2010-04-11 17:47:23 +00:00
|
|
|
|
2013-02-18 09:56:29 +00:00
|
|
|
. /lib/functions/leds.sh
|
2010-04-11 17:47:23 +00:00
|
|
|
. /lib/ramips.sh
|
|
|
|
|
|
|
|
get_status_led() {
|
|
|
|
case $(ramips_board_name) in
|
2015-08-17 06:24:34 +00:00
|
|
|
3g150b)
|
|
|
|
status_led="3g150b:blue:ap"
|
|
|
|
;;
|
|
|
|
3g300m)
|
|
|
|
status_led="3g300m:blue:ap"
|
2012-07-12 13:29:46 +00:00
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
3g-6200n)
|
|
|
|
status_led="3g-6200n:green:power"
|
2013-01-19 17:05:06 +00:00
|
|
|
;;
|
2015-07-07 13:43:37 +00:00
|
|
|
a5-v11)
|
|
|
|
status_led="a5-v11:red:power"
|
|
|
|
;;
|
2014-12-13 08:07:03 +00:00
|
|
|
ai-br100)
|
2015-08-17 06:24:34 +00:00
|
|
|
status_led="ai-br100:blue:wlan"
|
|
|
|
;;
|
|
|
|
all0239-3g)
|
|
|
|
status_led="all0239-3g:green:status"
|
2014-12-13 08:07:03 +00:00
|
|
|
;;
|
2014-11-03 08:00:13 +00:00
|
|
|
ar670w)
|
|
|
|
status_led="ar670w:green:power"
|
|
|
|
;;
|
2014-04-22 08:08:35 +00:00
|
|
|
ar725w)
|
|
|
|
status_led="ar725w:green:power"
|
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
asl26555)
|
|
|
|
status_led="asl26555:green:power"
|
2014-06-13 09:16:15 +00:00
|
|
|
;;
|
2015-08-17 05:58:57 +00:00
|
|
|
atp-52b)
|
|
|
|
status_led="atp-52b:green:run"
|
2012-01-23 10:23:32 +00:00
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
awapn2403)
|
|
|
|
status_led="awapn2403:green:wps"
|
|
|
|
;;
|
|
|
|
br-6425)
|
|
|
|
status_led="br-6425:green:power"
|
2013-04-25 19:02:53 +00:00
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
br-6475nd)
|
|
|
|
status_led="br-6475nd:green:power"
|
2013-02-02 17:01:50 +00:00
|
|
|
;;
|
2015-05-23 15:26:39 +00:00
|
|
|
cf-wr800n)
|
2015-08-17 06:24:34 +00:00
|
|
|
status_led="cf-wr800n:white:wps"
|
2015-05-23 15:26:39 +00:00
|
|
|
;;
|
2014-06-02 12:42:52 +00:00
|
|
|
cy-swr1100)
|
2015-08-17 06:24:34 +00:00
|
|
|
status_led="cy-swr1100:blue:wps"
|
2014-06-02 12:42:52 +00:00
|
|
|
;;
|
2013-04-03 10:00:08 +00:00
|
|
|
d105)
|
|
|
|
status_led="d105:red:power"
|
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
dap-1350)
|
|
|
|
status_led="dap-1350:blue:power"
|
|
|
|
;;
|
|
|
|
dcs-930)
|
|
|
|
status_led="dcs-930:green:status"
|
2010-04-11 17:47:23 +00:00
|
|
|
;;
|
2015-06-18 18:20:46 +00:00
|
|
|
dcs-930l-b1)
|
2015-08-17 06:24:34 +00:00
|
|
|
status_led="dcs-930l-b1:red:power"
|
2015-06-18 18:20:46 +00:00
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
dir-300-b1)
|
|
|
|
status_led="dir-300-b1:green:status"
|
2012-10-18 07:23:03 +00:00
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
dir-300-b7)
|
|
|
|
status_led="dir-300-b7:green:status"
|
|
|
|
;;
|
|
|
|
dir-320-b1)
|
|
|
|
status_led="dir-320-b1:green:status"
|
|
|
|
;;
|
|
|
|
dir-600-b1)
|
|
|
|
status_led="dir-600-b1:green:status"
|
|
|
|
;;
|
|
|
|
dir-600-b2)
|
|
|
|
status_led="dir-600-b2:green:status"
|
|
|
|
;;
|
|
|
|
dir-610-a1)
|
|
|
|
status_led="dir-610-a1:green:status"
|
|
|
|
;;
|
|
|
|
dir-615-d)
|
|
|
|
status_led="dir-615-d:green:status"
|
|
|
|
;;
|
|
|
|
dir-615-h1)
|
|
|
|
status_led="dir-615-h1:green:status"
|
|
|
|
;;
|
|
|
|
dir-620-a1)
|
|
|
|
status_led="dir-620-a1:green:status"
|
|
|
|
;;
|
|
|
|
dir-620-d1)
|
|
|
|
status_led="dir-620-d1:green:status"
|
|
|
|
;;
|
|
|
|
dir-645)
|
|
|
|
status_led="dir-645:green:wps"
|
2012-07-24 20:38:43 +00:00
|
|
|
;;
|
2014-11-05 14:37:13 +00:00
|
|
|
e1700)
|
2015-08-17 06:24:34 +00:00
|
|
|
status_led="e1700:green:power"
|
2014-11-05 14:37:13 +00:00
|
|
|
;;
|
2011-12-23 14:27:10 +00:00
|
|
|
esr-9753)
|
|
|
|
status_led="esr-9753:orange:power"
|
|
|
|
;;
|
2012-01-23 10:23:32 +00:00
|
|
|
f5d8235-v2)
|
2015-08-17 06:24:34 +00:00
|
|
|
status_led="f5d8235-v2:blue:router"
|
|
|
|
;;
|
|
|
|
f7c027)
|
|
|
|
status_led="f7c027:orange:status"
|
2011-12-28 08:43:43 +00:00
|
|
|
;;
|
2010-04-11 17:47:23 +00:00
|
|
|
fonera20n)
|
|
|
|
status_led="fonera20n:green:power"
|
|
|
|
;;
|
2014-01-12 12:07:40 +00:00
|
|
|
hlk-rm04)
|
|
|
|
status_led="hlk-rm04:red:power"
|
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
hpm)
|
|
|
|
status_led="hpm:green:status"
|
|
|
|
;;
|
2014-10-06 04:52:07 +00:00
|
|
|
ht-tm02)
|
2015-01-08 20:26:20 +00:00
|
|
|
status_led="ht-tm02:blue:wlan"
|
2014-10-06 04:52:07 +00:00
|
|
|
;;
|
2011-03-27 19:19:40 +00:00
|
|
|
hw550-3g)
|
|
|
|
status_led="hw550-3g:green:status"
|
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
ip2202)
|
|
|
|
status_led="ip2202:green:run"
|
|
|
|
;;
|
2015-01-17 14:06:13 +00:00
|
|
|
m2m)
|
|
|
|
status_led="m2m:blue:wifi"
|
|
|
|
;;
|
2013-08-01 14:30:53 +00:00
|
|
|
m3)
|
|
|
|
status_led="m3:blue:status"
|
|
|
|
;;
|
2013-08-01 14:30:58 +00:00
|
|
|
m4)
|
|
|
|
status_led="m4:blue:status"
|
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
miniembwifi)
|
|
|
|
status_led="miniembwifi:green:status"
|
|
|
|
;;
|
|
|
|
miwifi-mini)
|
|
|
|
status_led="miwifi-mini:red:status"
|
|
|
|
;;
|
|
|
|
mlw221)
|
|
|
|
status_led="mlw221:blue:system"
|
|
|
|
;;
|
2015-01-17 07:07:36 +00:00
|
|
|
mlwg2)
|
2015-08-17 06:24:34 +00:00
|
|
|
status_led="mlwg2:blue:system"
|
2015-01-17 07:07:36 +00:00
|
|
|
;;
|
2011-04-04 08:43:07 +00:00
|
|
|
mofi3500-3gn)
|
|
|
|
status_led="mofi3500-3gn:green:status"
|
|
|
|
;;
|
2013-07-27 09:23:52 +00:00
|
|
|
mpr-a1)
|
2015-08-17 06:24:34 +00:00
|
|
|
status_led="mpr-a1:red:power"
|
2013-07-27 09:23:52 +00:00
|
|
|
;;
|
2013-06-10 08:24:56 +00:00
|
|
|
mpr-a2)
|
2015-08-17 06:24:34 +00:00
|
|
|
status_led="mpr-a2:red:power"
|
2013-06-10 08:24:56 +00:00
|
|
|
;;
|
2015-05-23 15:27:05 +00:00
|
|
|
mr-102n)
|
|
|
|
status_led="mr-102n:amber:status"
|
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
mzk-dp150n)
|
|
|
|
status_led="mzk-dp150n:green:power"
|
|
|
|
;;
|
|
|
|
mzk-w300nh2)
|
|
|
|
status_led="mzk-w300nh2:green:power"
|
|
|
|
;;
|
|
|
|
na930)
|
|
|
|
status_led="na930:blue:power"
|
|
|
|
;;
|
2011-08-22 20:41:49 +00:00
|
|
|
nbg-419n)
|
|
|
|
status_led="nbg-419n:green:power"
|
|
|
|
;;
|
2011-07-28 10:56:32 +00:00
|
|
|
nw718)
|
|
|
|
status_led="nw718:amber:cpu"
|
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
oy-0001)
|
|
|
|
status_led="oy-0001:green:wifi"
|
2011-12-14 20:51:26 +00:00
|
|
|
;;
|
2015-06-18 18:20:40 +00:00
|
|
|
pbr-m1)
|
|
|
|
status_led="pbr-m1:green:sys"
|
|
|
|
;;
|
2012-06-19 09:52:15 +00:00
|
|
|
psr-680w)
|
|
|
|
status_led="psr-680w:red:wan"
|
|
|
|
;;
|
2011-07-06 08:05:00 +00:00
|
|
|
pwh2004)
|
|
|
|
status_led="pwh2004:green:power"
|
|
|
|
;;
|
2015-08-17 06:01:06 +00:00
|
|
|
px-4885)
|
|
|
|
status_led="px-4885:orange:wifi"
|
2015-06-18 18:20:56 +00:00
|
|
|
;;
|
|
|
|
re6500)
|
2015-08-17 06:24:34 +00:00
|
|
|
status_led="re6500:orange:wifi"
|
|
|
|
;;
|
|
|
|
rt-n10-plus)
|
|
|
|
status_led="rt-n10-plus:green:wps"
|
|
|
|
;;
|
|
|
|
rt-n13u)
|
|
|
|
status_led="rt-n13u:blue:power"
|
|
|
|
;;
|
|
|
|
rt-n14u)
|
|
|
|
status_led="rt-n14u:blue:power"
|
2014-04-22 08:08:51 +00:00
|
|
|
;;
|
2011-07-06 08:05:00 +00:00
|
|
|
rt-n15)
|
|
|
|
status_led="rt-n15:blue:power"
|
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
rt-n56u)
|
|
|
|
status_led="rt-n56u:blue:power"
|
2012-02-13 15:18:04 +00:00
|
|
|
;;
|
2014-06-02 12:42:48 +00:00
|
|
|
rut5xx)
|
|
|
|
status_led="rut5xx:green:status"
|
|
|
|
;;
|
2015-07-24 09:09:22 +00:00
|
|
|
sap-g3200u3)
|
2015-08-17 06:24:34 +00:00
|
|
|
status_led="sap-g3200u3:green:usb"
|
2015-07-24 09:09:22 +00:00
|
|
|
;;
|
2012-02-19 16:44:49 +00:00
|
|
|
sl-r7205)
|
2015-08-17 06:24:34 +00:00
|
|
|
status_led="sl-r7205:green:wifi"
|
|
|
|
;;
|
|
|
|
tew-691gr)
|
|
|
|
status_led="tew-691gr:green:wps"
|
2012-02-19 16:44:49 +00:00
|
|
|
;;
|
2012-10-18 07:23:07 +00:00
|
|
|
tew-692gr)
|
2015-08-17 06:24:34 +00:00
|
|
|
status_led="tew-692gr:green:wps"
|
|
|
|
;;
|
|
|
|
ur-326n4g)
|
|
|
|
status_led="ur-326n4g:green:wps"
|
|
|
|
;;
|
|
|
|
ur-336un)
|
|
|
|
status_led="ur-336un:green:wps"
|
2012-10-18 07:23:07 +00:00
|
|
|
;;
|
2012-02-15 21:13:11 +00:00
|
|
|
v11st-fe)
|
|
|
|
status_led="v11st-fe:green:status"
|
|
|
|
;;
|
2011-07-06 08:05:00 +00:00
|
|
|
v22rw-2x2)
|
|
|
|
status_led="v22rw-2x2:green:security"
|
|
|
|
;;
|
2014-08-01 20:51:24 +00:00
|
|
|
vocore)
|
|
|
|
status_led="vocore:green:status"
|
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
w150m)
|
|
|
|
status_led="w150m:blue:ap"
|
|
|
|
;;
|
2012-04-21 12:30:40 +00:00
|
|
|
w306r-v20)
|
2012-05-02 19:17:59 +00:00
|
|
|
status_led="w306r-v20:green:sys"
|
2012-04-21 12:30:40 +00:00
|
|
|
;;
|
2011-12-28 08:43:32 +00:00
|
|
|
w502u)
|
2015-08-17 06:24:34 +00:00
|
|
|
status_led="w502u:blue:wps"
|
2011-12-28 08:43:32 +00:00
|
|
|
;;
|
2012-01-23 10:23:32 +00:00
|
|
|
wcr-150gn)
|
2015-08-17 06:24:34 +00:00
|
|
|
status_led="wcr-150gn:amber:power"
|
|
|
|
;;
|
|
|
|
whr-1166d)
|
|
|
|
status_led="whr-1166d:orange:wifi"
|
|
|
|
;;
|
|
|
|
whr-300hp2)
|
|
|
|
status_led="whr-300hp2:orange:wifi"
|
|
|
|
;;
|
|
|
|
whr-600d)
|
|
|
|
status_led="whr-600d:orange:wifi"
|
2012-01-23 10:23:32 +00:00
|
|
|
;;
|
2011-07-06 08:05:00 +00:00
|
|
|
whr-g300n)
|
|
|
|
status_led="whr-g300n:green:router"
|
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
wl-330n)
|
|
|
|
status_led="wl-330n:blue:power"
|
2011-12-27 16:56:30 +00:00
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
wl-330n3g)
|
|
|
|
status_led="wl-330n3g:blue:power"
|
2015-02-16 21:19:18 +00:00
|
|
|
;;
|
2011-12-23 14:27:16 +00:00
|
|
|
wl-351)
|
|
|
|
status_led="wl-351:amber:power"
|
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
wli-tx4-ag300n)
|
|
|
|
status_led="wli-tx4-ag300n:blue:power"
|
2014-07-12 06:54:03 +00:00
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
wmr-300)
|
|
|
|
status_led="wmr-300:green:status"
|
2014-11-14 16:52:36 +00:00
|
|
|
;;
|
2013-04-09 14:19:33 +00:00
|
|
|
wnce2001)
|
2015-08-17 06:24:34 +00:00
|
|
|
status_led="wnce2001:green:power"
|
2013-04-09 14:19:33 +00:00
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
wr512-3gn)
|
|
|
|
status_led="wr512-3gn:green:wps"
|
2014-10-20 06:28:48 +00:00
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
wsr-1166)
|
|
|
|
status_led="wsr-1166:orange:diag"
|
2012-12-29 17:50:38 +00:00
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
wsr-600)
|
|
|
|
status_led="wsr-600:orange:diag"
|
2013-03-11 21:02:43 +00:00
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
wt3020)
|
|
|
|
status_led="wt3020:blue:power"
|
|
|
|
;;
|
|
|
|
wzr-agl300nh)
|
|
|
|
status_led="wzr-agl300nh:green:router"
|
2012-04-23 16:56:06 +00:00
|
|
|
;;
|
2013-08-01 14:31:04 +00:00
|
|
|
x5)
|
|
|
|
status_led="x5:green:power"
|
|
|
|
;;
|
2013-08-01 14:31:09 +00:00
|
|
|
x8)
|
|
|
|
status_led="x8:green:power"
|
|
|
|
;;
|
2012-03-04 16:09:13 +00:00
|
|
|
xdxrn502j)
|
|
|
|
status_led="xdxrn502j:green:power"
|
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
y1)
|
|
|
|
status_led="y1:blue:power"
|
2014-02-18 13:33:25 +00:00
|
|
|
;;
|
2014-08-03 11:13:52 +00:00
|
|
|
y1s)
|
2015-08-17 06:24:34 +00:00
|
|
|
status_led="y1s:blue:power"
|
2014-08-03 11:13:52 +00:00
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
zbt-wr8305rt)
|
|
|
|
status_led="zbt-wr8305rt:green:sys"
|
2015-04-01 08:31:46 +00:00
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
zte-q7)
|
|
|
|
status_led="zte-q7:red:status"
|
2015-07-17 12:51:08 +00:00
|
|
|
;;
|
2011-03-27 19:19:40 +00:00
|
|
|
esac
|
2010-04-11 17:47:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
set_state() {
|
|
|
|
get_status_led
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
preinit)
|
2013-02-18 09:56:29 +00:00
|
|
|
status_led_blink_preinit
|
2010-04-11 17:47:23 +00:00
|
|
|
;;
|
|
|
|
failsafe)
|
2013-02-18 09:56:29 +00:00
|
|
|
status_led_blink_failsafe
|
2010-04-11 17:47:23 +00:00
|
|
|
;;
|
2014-12-15 10:37:00 +00:00
|
|
|
preinit_regular)
|
|
|
|
status_led_blink_preinit_regular
|
|
|
|
;;
|
2010-04-11 17:47:23 +00:00
|
|
|
done)
|
|
|
|
status_led_on
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|