2010-04-12 01:47:23 +08:00
|
|
|
#!/bin/sh
|
2013-02-18 17:56:29 +08:00
|
|
|
# Copyright (C) 2010-2013 OpenWrt.org
|
2010-04-12 01:47:23 +08:00
|
|
|
|
2013-02-18 17:56:29 +08:00
|
|
|
. /lib/functions/leds.sh
|
2010-04-12 01:47:23 +08:00
|
|
|
. /lib/ramips.sh
|
|
|
|
|
|
|
|
get_status_led() {
|
|
|
|
case $(ramips_board_name) in
|
2012-07-12 21:29:46 +08:00
|
|
|
3g-6200n)
|
|
|
|
status_led="edimax:green:power"
|
|
|
|
;;
|
2013-04-03 18:00:21 +08:00
|
|
|
3g300m | w150m)
|
2013-01-20 01:05:06 +08:00
|
|
|
status_led="tenda:blue:ap"
|
|
|
|
;;
|
2014-04-22 16:08:35 +08:00
|
|
|
ar725w)
|
|
|
|
status_led="ar725w:green:power"
|
|
|
|
;;
|
2014-06-13 17:16:15 +08:00
|
|
|
awapn2403)
|
|
|
|
status_led="asiarf:green:wps"
|
|
|
|
;;
|
2012-01-23 18:23:32 +08:00
|
|
|
argus-atp52b)
|
|
|
|
status_led="argus-atp52b:green:run"
|
|
|
|
;;
|
2013-04-26 03:02:53 +08:00
|
|
|
asl26555)
|
|
|
|
status_led="asl26555:green:power"
|
|
|
|
;;
|
2013-01-06 19:11:42 +08:00
|
|
|
br6524n)
|
|
|
|
status_led="edimax:blue:power"
|
|
|
|
;;
|
2014-01-16 02:29:44 +08:00
|
|
|
br6425 | br-6475nd)
|
2013-02-03 01:01:50 +08:00
|
|
|
status_led="edimax:green:power"
|
|
|
|
;;
|
2014-06-02 20:42:52 +08:00
|
|
|
cy-swr1100)
|
|
|
|
status_led="samsung:blue:wps"
|
|
|
|
;;
|
2013-04-03 18:00:08 +08:00
|
|
|
d105)
|
|
|
|
status_led="d105:red:power"
|
|
|
|
;;
|
2013-09-19 13:56:46 +08:00
|
|
|
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)
|
2011-07-28 18:56:21 +08:00
|
|
|
status_led="d-link:green:status"
|
2010-04-12 01:47:23 +08:00
|
|
|
;;
|
2012-10-18 15:23:03 +08:00
|
|
|
dir-645)
|
|
|
|
status_led="d-link:green:wps"
|
|
|
|
;;
|
2012-07-25 04:38:43 +08:00
|
|
|
dap-1350)
|
|
|
|
status_led="d-link:blue:power"
|
|
|
|
;;
|
2011-12-23 22:27:10 +08:00
|
|
|
esr-9753)
|
|
|
|
status_led="esr-9753:orange:power"
|
|
|
|
;;
|
2012-01-23 18:23:32 +08:00
|
|
|
f5d8235-v2)
|
|
|
|
status_led="f5d8235v2:blue:router"
|
2011-12-28 16:43:43 +08:00
|
|
|
;;
|
2010-04-12 01:47:23 +08:00
|
|
|
fonera20n)
|
|
|
|
status_led="fonera20n:green:power"
|
|
|
|
;;
|
2013-08-01 22:31:15 +08:00
|
|
|
ip2202)
|
|
|
|
status_led="ip2202:green:run"
|
|
|
|
;;
|
2012-11-30 01:37:13 +08:00
|
|
|
rt-n13u)
|
|
|
|
status_led="rt-n13u:power"
|
|
|
|
;;
|
2014-01-12 20:07:40 +08:00
|
|
|
hlk-rm04)
|
|
|
|
status_led="hlk-rm04:red:power"
|
|
|
|
;;
|
2012-08-18 01:56:07 +08:00
|
|
|
all0239-3g|\
|
2011-03-28 03:19:40 +08:00
|
|
|
hw550-3g)
|
|
|
|
status_led="hw550-3g:green:status"
|
|
|
|
;;
|
2013-08-01 22:30:53 +08:00
|
|
|
m3)
|
|
|
|
status_led="m3:blue:status"
|
|
|
|
;;
|
2013-08-01 22:30:58 +08:00
|
|
|
m4)
|
|
|
|
status_led="m4:blue:status"
|
|
|
|
;;
|
2011-04-04 16:43:07 +08:00
|
|
|
mofi3500-3gn)
|
|
|
|
status_led="mofi3500-3gn:green:status"
|
|
|
|
;;
|
2013-07-27 17:23:52 +08:00
|
|
|
mpr-a1)
|
|
|
|
status_led="mpr-a1:red:power"
|
|
|
|
;;
|
2013-06-10 16:24:56 +08:00
|
|
|
mpr-a2)
|
|
|
|
status_led="mpr-a2:red:power"
|
|
|
|
;;
|
2011-08-23 04:41:49 +08:00
|
|
|
nbg-419n)
|
|
|
|
status_led="nbg-419n:green:power"
|
|
|
|
;;
|
2011-07-28 18:56:32 +08:00
|
|
|
nw718)
|
|
|
|
status_led="nw718:amber:cpu"
|
|
|
|
;;
|
2013-02-03 01:21:05 +08:00
|
|
|
omni-emb|\
|
|
|
|
omni-emb-hpm)
|
2011-12-15 04:51:26 +08:00
|
|
|
status_led="emb:green:status"
|
|
|
|
;;
|
2012-06-19 17:52:15 +08:00
|
|
|
psr-680w)
|
|
|
|
status_led="psr-680w:red:wan"
|
|
|
|
;;
|
2011-07-06 16:05:00 +08:00
|
|
|
pwh2004)
|
|
|
|
status_led="pwh2004:green:power"
|
|
|
|
;;
|
2014-04-22 16:08:51 +08:00
|
|
|
px4885)
|
|
|
|
status_led="7links:orange:wifi"
|
|
|
|
;;
|
2011-07-06 16:05:00 +08:00
|
|
|
rt-n15)
|
|
|
|
status_led="rt-n15:blue:power"
|
|
|
|
;;
|
2012-03-05 00:09:11 +08:00
|
|
|
rt-n10-plus)
|
|
|
|
status_led="asus:green:wps"
|
|
|
|
;;
|
2012-04-24 00:56:05 +08:00
|
|
|
rt-n56u | wl-330n | wl-330n3g)
|
2012-02-13 23:18:04 +08:00
|
|
|
status_led="asus:blue:power"
|
|
|
|
;;
|
2014-06-02 20:42:48 +08:00
|
|
|
rut5xx)
|
|
|
|
status_led="rut5xx:green:status"
|
|
|
|
;;
|
2012-02-20 00:44:49 +08:00
|
|
|
sl-r7205)
|
|
|
|
status_led="sl-r7205:green:status"
|
|
|
|
;;
|
2012-10-18 15:23:12 +08:00
|
|
|
tew-691gr|\
|
2012-10-18 15:23:07 +08:00
|
|
|
tew-692gr)
|
|
|
|
status_led="trendnet:green:wps"
|
|
|
|
;;
|
2012-02-16 05:13:11 +08:00
|
|
|
v11st-fe)
|
|
|
|
status_led="v11st-fe:green:status"
|
|
|
|
;;
|
2011-07-06 16:05:00 +08:00
|
|
|
v22rw-2x2)
|
|
|
|
status_led="v22rw-2x2:green:security"
|
|
|
|
;;
|
2012-04-21 20:30:40 +08:00
|
|
|
w306r-v20)
|
2012-05-03 03:17:59 +08:00
|
|
|
status_led="w306r-v20:green:sys"
|
2012-04-21 20:30:40 +08:00
|
|
|
;;
|
2011-12-28 16:43:32 +08:00
|
|
|
w502u)
|
|
|
|
status_led="alfa:blue:wps"
|
|
|
|
;;
|
2012-01-23 18:23:32 +08:00
|
|
|
wcr-150gn)
|
|
|
|
status_led="wcr150gn:amber:power"
|
|
|
|
;;
|
2011-07-06 16:05:00 +08:00
|
|
|
whr-g300n)
|
|
|
|
status_led="whr-g300n:green:router"
|
|
|
|
;;
|
2013-11-17 04:28:52 +08:00
|
|
|
wmr300 | \
|
|
|
|
whr-300hp2 | \
|
2013-10-28 14:47:31 +08:00
|
|
|
whr-600d)
|
|
|
|
status_led="buffalo:green:status"
|
|
|
|
;;
|
2011-12-28 00:56:30 +08:00
|
|
|
wli-tx4-ag300n)
|
|
|
|
status_led="buffalo:blue:power"
|
|
|
|
;;
|
2011-12-23 22:27:16 +08:00
|
|
|
wl-351)
|
|
|
|
status_led="wl-351:amber:power"
|
|
|
|
;;
|
2012-01-22 21:43:23 +08:00
|
|
|
wr512-3gn)
|
|
|
|
status_led="wr512:green:wps"
|
|
|
|
;;
|
2013-04-09 22:19:33 +08:00
|
|
|
wnce2001)
|
|
|
|
status_led="netgear:green:power"
|
|
|
|
;;
|
2012-12-30 01:50:38 +08:00
|
|
|
mzk-w300nh2)
|
|
|
|
status_led="mzkw300nh2:green:power"
|
|
|
|
;;
|
2013-03-12 05:02:43 +08:00
|
|
|
ur-326n4g)
|
|
|
|
status_led="ur326:green:wps"
|
|
|
|
;;
|
2012-04-24 00:56:06 +08:00
|
|
|
ur-336un)
|
|
|
|
status_led="ur336:green:wps"
|
|
|
|
;;
|
2013-08-01 22:31:04 +08:00
|
|
|
x5)
|
|
|
|
status_led="x5:green:power"
|
|
|
|
;;
|
2013-08-01 22:31:09 +08:00
|
|
|
x8)
|
|
|
|
status_led="x8:green:power"
|
|
|
|
;;
|
2012-03-05 00:09:13 +08:00
|
|
|
xdxrn502j)
|
|
|
|
status_led="xdxrn502j:green:power"
|
|
|
|
;;
|
2013-06-10 16:24:50 +08:00
|
|
|
f7c027)
|
|
|
|
status_led="belkin:orange:status"
|
2014-02-18 21:33:25 +08:00
|
|
|
;;
|
|
|
|
na930)
|
|
|
|
status_led="na930:blue:power"
|
|
|
|
;;
|
2011-03-28 03:19:40 +08:00
|
|
|
esac
|
2010-04-12 01:47:23 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
set_state() {
|
|
|
|
get_status_led
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
preinit)
|
2013-02-18 17:56:29 +08:00
|
|
|
status_led_blink_preinit
|
2010-04-12 01:47:23 +08:00
|
|
|
;;
|
|
|
|
failsafe)
|
2013-02-18 17:56:29 +08:00
|
|
|
status_led_blink_failsafe
|
2010-04-12 01:47:23 +08:00
|
|
|
;;
|
|
|
|
done)
|
|
|
|
status_led_on
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|