2009-08-20 03:26:53 +08:00
|
|
|
#!/bin/sh
|
2013-02-18 17:56:27 +08:00
|
|
|
# Copyright (C) 2009-2013 OpenWrt.org
|
2009-08-20 03:26:53 +08:00
|
|
|
|
2013-02-18 17:56:27 +08:00
|
|
|
. /lib/functions/leds.sh
|
2009-08-20 03:26:53 +08:00
|
|
|
. /lib/ar71xx.sh
|
|
|
|
|
|
|
|
get_status_led() {
|
|
|
|
case $(ar71xx_board_name) in
|
2012-01-02 03:30:25 +08:00
|
|
|
alfa-nx)
|
|
|
|
status_led="alfa:green:led_8"
|
|
|
|
;;
|
2012-08-22 20:33:22 +08:00
|
|
|
all0305)
|
|
|
|
status_led="eap7660d:green:ds4"
|
|
|
|
;;
|
2013-01-30 03:12:32 +08:00
|
|
|
ap132)
|
|
|
|
status_led="ap132:green:status"
|
|
|
|
;;
|
2012-12-26 17:50:36 +08:00
|
|
|
ap136-010|\
|
|
|
|
ap136-020)
|
2012-07-05 16:26:50 +08:00
|
|
|
status_led="ap136:green:status"
|
|
|
|
;;
|
2012-12-30 00:02:27 +08:00
|
|
|
ap135-020)
|
|
|
|
status_led="ap135:green:status"
|
|
|
|
;;
|
2009-08-20 03:26:53 +08:00
|
|
|
ap81)
|
|
|
|
status_led="ap81:green:status"
|
|
|
|
;;
|
|
|
|
ap83)
|
|
|
|
status_led="ap83:green:power"
|
|
|
|
;;
|
2010-09-27 16:59:53 +08:00
|
|
|
ap96)
|
|
|
|
status_led="ap96:green:led2"
|
|
|
|
;;
|
2009-08-20 03:26:53 +08:00
|
|
|
aw-nr580)
|
|
|
|
status_led="aw-nr580:green:ready"
|
|
|
|
;;
|
2014-09-15 18:19:14 +08:00
|
|
|
bullet-m | rocket-m | nano-m | nanostation-m | nanostation-m-xw | loco-m-xw)
|
2009-10-02 03:41:13 +08:00
|
|
|
status_led="ubnt:green:link4"
|
|
|
|
;;
|
2013-10-30 14:50:58 +08:00
|
|
|
bxu2000n-2-a1)
|
|
|
|
status_led="bhu:green:status"
|
|
|
|
;;
|
2012-10-27 16:55:39 +08:00
|
|
|
cap4200ag)
|
|
|
|
status_led="senao:green:pwr"
|
|
|
|
;;
|
2014-11-26 16:59:32 +08:00
|
|
|
cpe510)
|
|
|
|
status_led="tp-link:green:link4"
|
|
|
|
;;
|
2011-11-12 18:54:10 +08:00
|
|
|
db120)
|
|
|
|
status_led="db120:green:status"
|
|
|
|
;;
|
2014-11-27 22:27:34 +08:00
|
|
|
dgl-5500-a1 |\
|
2014-11-19 17:20:47 +08:00
|
|
|
dhp-1565-a1|\
|
2013-08-05 18:41:48 +08:00
|
|
|
dir-505-a1 |\
|
2012-02-01 02:37:15 +08:00
|
|
|
dir-600-a1 |\
|
2014-06-02 22:43:35 +08:00
|
|
|
dir-615-e1 |\
|
2012-02-01 02:37:15 +08:00
|
|
|
dir-615-e4)
|
|
|
|
status_led="d-link:green:power"
|
2010-01-11 16:02:10 +08:00
|
|
|
;;
|
2009-12-18 20:57:01 +08:00
|
|
|
dir-615-c1)
|
2012-02-01 02:37:15 +08:00
|
|
|
status_led="d-link:green:status"
|
2012-02-01 02:37:09 +08:00
|
|
|
;;
|
2013-09-22 00:08:44 +08:00
|
|
|
dir-825-b1)
|
2012-02-01 02:37:15 +08:00
|
|
|
status_led="d-link:orange:power"
|
2009-12-03 23:07:34 +08:00
|
|
|
;;
|
2013-09-22 00:08:44 +08:00
|
|
|
dir-825-c1 |\
|
|
|
|
dir-835-a1)
|
|
|
|
status_led="d-link:amber:power"
|
2013-01-30 06:50:54 +08:00
|
|
|
;;
|
2014-10-14 18:33:07 +08:00
|
|
|
dragino2)
|
|
|
|
status_led="dragino2:red:system"
|
|
|
|
;;
|
2014-07-15 05:30:28 +08:00
|
|
|
eap300v2)
|
|
|
|
status_led="engenius:blue:power"
|
|
|
|
;;
|
2010-08-15 05:07:31 +08:00
|
|
|
eap7660d)
|
|
|
|
status_led="eap7660d:green:ds4"
|
|
|
|
;;
|
2014-06-26 19:49:47 +08:00
|
|
|
el-mini | \
|
|
|
|
el-m150)
|
2014-11-15 00:58:29 +08:00
|
|
|
status_led="easylink:green:system"
|
2014-06-26 19:49:47 +08:00
|
|
|
;;
|
2014-07-14 02:21:06 +08:00
|
|
|
gl-inet)
|
|
|
|
status_led="gl-connect:green:lan"
|
|
|
|
;;
|
2014-07-14 03:43:58 +08:00
|
|
|
esr1750)
|
|
|
|
status_led="esr1750:amber:power"
|
|
|
|
;;
|
2014-07-14 18:25:51 +08:00
|
|
|
esr900)
|
|
|
|
status_led="engenius:amber:power"
|
|
|
|
;;
|
2014-06-02 22:56:35 +08:00
|
|
|
hiwifi-hc6361)
|
|
|
|
status_led="hiwifi:blue:system"
|
|
|
|
;;
|
2011-12-15 04:54:10 +08:00
|
|
|
hornet-ub)
|
|
|
|
status_led="alfa:blue:wps"
|
|
|
|
;;
|
2012-03-17 02:00:34 +08:00
|
|
|
ja76pf | \
|
|
|
|
ja76pf2)
|
2012-03-17 02:00:26 +08:00
|
|
|
status_led="jjplus:green:led1"
|
2010-12-11 01:57:51 +08:00
|
|
|
;;
|
2009-08-20 03:26:53 +08:00
|
|
|
ls-sr71)
|
|
|
|
status_led="ubnt:green:d22"
|
|
|
|
;;
|
2012-11-18 17:32:35 +08:00
|
|
|
mr600)
|
|
|
|
status_led="mr600:orange:power"
|
|
|
|
;;
|
2013-02-01 23:50:45 +08:00
|
|
|
mr600v2)
|
|
|
|
status_led="mr600:blue:power"
|
|
|
|
;;
|
2014-11-15 00:55:04 +08:00
|
|
|
mr900 | \
|
|
|
|
mr900v2)
|
2014-11-15 00:54:15 +08:00
|
|
|
status_led="mr900:blue:power"
|
|
|
|
;;
|
2013-12-16 15:16:43 +08:00
|
|
|
mynet-n600 | \
|
|
|
|
mynet-n750)
|
2013-09-20 06:36:41 +08:00
|
|
|
status_led="wd:blue:power"
|
|
|
|
;;
|
2013-11-08 06:31:53 +08:00
|
|
|
mynet-rext)
|
|
|
|
status_led="wd:blue:power"
|
|
|
|
;;
|
2011-11-01 19:20:47 +08:00
|
|
|
mzk-w04nu | \
|
2009-08-20 03:26:53 +08:00
|
|
|
mzk-w300nh)
|
2011-11-01 19:20:47 +08:00
|
|
|
status_led="planex:green:status"
|
2009-08-20 03:26:53 +08:00
|
|
|
;;
|
2010-12-10 23:17:03 +08:00
|
|
|
nbg460n_550n_550nh)
|
|
|
|
status_led="nbg460n:green:power"
|
|
|
|
;;
|
2014-04-13 16:29:07 +08:00
|
|
|
nbg6716)
|
|
|
|
status_led="nbg6716:white:power"
|
|
|
|
;;
|
2012-07-05 16:26:53 +08:00
|
|
|
om2p | \
|
2014-06-02 21:21:02 +08:00
|
|
|
om2pv2 | \
|
2012-10-17 16:26:01 +08:00
|
|
|
om2p-hs | \
|
2014-06-02 21:21:31 +08:00
|
|
|
om2p-hsv2 | \
|
2012-07-05 16:26:53 +08:00
|
|
|
om2p-lc)
|
2011-10-27 15:54:51 +08:00
|
|
|
status_led="om2p:blue:power"
|
|
|
|
;;
|
2014-07-21 01:30:44 +08:00
|
|
|
om5p)
|
|
|
|
status_led="om5p:blue:power"
|
|
|
|
;;
|
2009-08-20 03:26:53 +08:00
|
|
|
pb44)
|
|
|
|
status_led="pb44:amber:jump1"
|
|
|
|
;;
|
2014-01-20 18:23:03 +08:00
|
|
|
rb-2011l|\
|
|
|
|
rb-2011uas|\
|
|
|
|
rb-2011uas-2hnd)
|
|
|
|
status_led="rb:green:usr"
|
|
|
|
;;
|
2010-03-06 04:29:24 +08:00
|
|
|
rb-411 | rb-411u | rb-433 | rb-433u | rb-450 | rb-450g | rb-493)
|
|
|
|
status_led="rb4xx:yellow:user"
|
|
|
|
;;
|
2014-01-20 18:23:02 +08:00
|
|
|
rb-750)
|
|
|
|
status_led="rb750:green:act"
|
|
|
|
;;
|
2014-02-23 16:11:54 +08:00
|
|
|
rb-911g-2hpnd|\
|
|
|
|
rb-911g-5hpnd|\
|
|
|
|
rb-912uag-2hpnd|\
|
|
|
|
rb-912uag-5hpnd)
|
|
|
|
status_led="rb:green:user"
|
|
|
|
;;
|
2014-06-18 18:08:08 +08:00
|
|
|
rb-951ui-2hnd)
|
|
|
|
status_led="rb:green:act"
|
|
|
|
;;
|
2014-07-01 21:38:30 +08:00
|
|
|
rb-sxt2n|\
|
|
|
|
rb-sxt5n)
|
|
|
|
status_led="rb:green:power"
|
|
|
|
;;
|
2009-12-15 16:35:11 +08:00
|
|
|
routerstation | routerstation-pro)
|
2009-08-20 03:26:53 +08:00
|
|
|
status_led="ubnt:green:rf"
|
|
|
|
;;
|
2012-01-06 15:20:59 +08:00
|
|
|
rw2458n)
|
|
|
|
status_led="rw2458n:green:d3"
|
|
|
|
;;
|
2014-08-11 19:44:51 +08:00
|
|
|
smart-300)
|
|
|
|
status_led="nc-link:green:system"
|
|
|
|
;;
|
2014-03-27 14:36:47 +08:00
|
|
|
oolite)
|
|
|
|
status_led="oolite:red:system"
|
|
|
|
;;
|
2014-09-15 18:19:38 +08:00
|
|
|
qihoo-c301)
|
|
|
|
status_led="qihoo:green:status"
|
|
|
|
;;
|
2009-08-20 03:26:53 +08:00
|
|
|
tew-632brp)
|
|
|
|
status_led="tew-632brp:green:status"
|
|
|
|
;;
|
2012-02-09 00:26:25 +08:00
|
|
|
tew-673gru)
|
|
|
|
status_led="trendnet:blue:wps"
|
|
|
|
;;
|
2013-09-23 17:49:02 +08:00
|
|
|
tew-712br|\
|
|
|
|
tew-732br)
|
2012-08-23 04:12:24 +08:00
|
|
|
status_led="trendnet:green:power"
|
|
|
|
;;
|
2012-01-25 15:44:45 +08:00
|
|
|
tl-mr3020)
|
|
|
|
status_led="tp-link:green:wps"
|
|
|
|
;;
|
2013-11-11 16:04:47 +08:00
|
|
|
tl-wa750re)
|
|
|
|
status_led="tp-link:orange:re"
|
|
|
|
;;
|
|
|
|
tl-wa850re)
|
|
|
|
status_led="tp-link:blue:re"
|
|
|
|
;;
|
2014-07-13 18:03:41 +08:00
|
|
|
tl-wa860re)
|
|
|
|
status_led="tp-link:green:power"
|
|
|
|
;;
|
2011-11-01 19:20:44 +08:00
|
|
|
tl-mr3220 | \
|
2012-12-19 16:50:41 +08:00
|
|
|
tl-mr3220-v2 | \
|
2011-11-01 19:20:44 +08:00
|
|
|
tl-mr3420 | \
|
2013-03-11 23:55:22 +08:00
|
|
|
tl-mr3420-v2 | \
|
2013-12-16 04:39:11 +08:00
|
|
|
tl-wa801nd-v2 | \
|
2011-11-01 19:20:44 +08:00
|
|
|
tl-wa901nd | \
|
|
|
|
tl-wa901nd-v2 | \
|
2013-12-16 05:34:19 +08:00
|
|
|
tl-wa901nd-v3 | \
|
2013-03-25 03:23:43 +08:00
|
|
|
tl-wdr3500 | \
|
2012-05-06 01:02:35 +08:00
|
|
|
tl-wr1041n-v2 | \
|
2011-11-01 19:20:44 +08:00
|
|
|
tl-wr1043nd | \
|
2013-11-30 04:51:13 +08:00
|
|
|
tl-wr1043nd-v2 | \
|
2011-11-01 19:20:44 +08:00
|
|
|
tl-wr741nd | \
|
2011-11-01 19:20:52 +08:00
|
|
|
tl-wr741nd-v4 | \
|
2011-11-01 19:20:44 +08:00
|
|
|
tl-wr841n-v1 | \
|
2012-01-05 01:30:57 +08:00
|
|
|
tl-wr841n-v7 | \
|
2012-10-05 04:16:05 +08:00
|
|
|
tl-wr841n-v8 | \
|
2014-07-13 15:12:22 +08:00
|
|
|
tl-wa830re-v2 | \
|
2013-11-15 18:11:24 +08:00
|
|
|
tl-wr842n-v2 | \
|
2011-11-01 19:20:44 +08:00
|
|
|
tl-wr941nd)
|
|
|
|
status_led="tp-link:green:system"
|
2009-12-08 20:46:30 +08:00
|
|
|
;;
|
2014-07-23 20:47:25 +08:00
|
|
|
archer-c5 | \
|
2013-05-31 00:23:09 +08:00
|
|
|
archer-c7 | \
|
2014-02-19 20:15:34 +08:00
|
|
|
tl-wdr4900-v2 | \
|
2013-07-26 15:31:59 +08:00
|
|
|
tl-mr10u | \
|
2013-09-20 01:52:42 +08:00
|
|
|
tl-mr13u | \
|
2012-06-19 19:51:18 +08:00
|
|
|
tl-wdr4300 | \
|
2013-04-27 01:00:49 +08:00
|
|
|
tl-wr703n | \
|
2013-07-28 18:23:33 +08:00
|
|
|
tl-wr710n | \
|
2013-04-27 01:00:49 +08:00
|
|
|
tl-wr720n-v3)
|
2011-11-01 19:20:44 +08:00
|
|
|
status_led="tp-link:blue:system"
|
2009-08-20 03:26:53 +08:00
|
|
|
;;
|
2014-04-07 16:00:02 +08:00
|
|
|
tl-wr841n-v9)
|
|
|
|
status_led="tp-link:green:qss"
|
|
|
|
;;
|
2012-01-08 03:36:35 +08:00
|
|
|
tl-wr2543n)
|
|
|
|
status_led="tp-link:green:wps"
|
|
|
|
;;
|
2014-07-15 00:03:35 +08:00
|
|
|
tube2h)
|
|
|
|
status_led="alfa:green:signal4"
|
|
|
|
;;
|
2010-12-21 01:28:34 +08:00
|
|
|
unifi)
|
|
|
|
status_led="ubnt:green:dome"
|
|
|
|
;;
|
2012-12-17 20:28:11 +08:00
|
|
|
uap-pro)
|
|
|
|
status_led="ubnt:white:dome"
|
|
|
|
;;
|
2014-07-21 01:30:17 +08:00
|
|
|
airgateway)
|
|
|
|
status_led="ubnt:white:status"
|
|
|
|
;;
|
2011-11-07 20:59:07 +08:00
|
|
|
whr-g301n | \
|
2011-11-01 19:20:46 +08:00
|
|
|
whr-hp-g300n | \
|
2011-11-07 20:59:10 +08:00
|
|
|
whr-hp-gn | \
|
2011-11-01 19:20:46 +08:00
|
|
|
wzr-hp-g300nh)
|
|
|
|
status_led="buffalo:green:router"
|
2011-10-25 05:49:26 +08:00
|
|
|
;;
|
2012-08-01 20:24:52 +08:00
|
|
|
wlae-ag300n)
|
|
|
|
status_led="buffalo:green:status"
|
|
|
|
;;
|
2012-08-29 18:11:55 +08:00
|
|
|
wzr-hp-ag300h | \
|
2013-03-04 05:59:34 +08:00
|
|
|
wzr-hp-g300nh2)
|
2011-12-19 06:20:17 +08:00
|
|
|
status_led="buffalo:red:diag"
|
|
|
|
;;
|
2014-11-26 16:28:22 +08:00
|
|
|
r6100 | \
|
2013-09-21 23:55:57 +08:00
|
|
|
wndap360 | \
|
|
|
|
wndr3700 | \
|
2014-07-22 02:41:52 +08:00
|
|
|
wndr3700v4 | \
|
2013-09-21 23:55:57 +08:00
|
|
|
wndr4300 | \
|
|
|
|
wnr2000 | \
|
|
|
|
wnr2200 |\
|
2013-07-28 18:23:37 +08:00
|
|
|
wnr612-v2)
|
2013-09-21 23:55:54 +08:00
|
|
|
status_led="netgear:green:power"
|
2013-07-28 18:23:37 +08:00
|
|
|
;;
|
2009-08-20 03:26:53 +08:00
|
|
|
wp543)
|
|
|
|
status_led="wp543:green:diag"
|
|
|
|
;;
|
|
|
|
wrt400n)
|
2011-12-31 21:54:11 +08:00
|
|
|
status_led="wrt400n:blue:wps"
|
2009-08-20 03:26:53 +08:00
|
|
|
;;
|
|
|
|
wrt160nl)
|
2009-09-06 02:46:43 +08:00
|
|
|
status_led="wrt160nl:blue:wps"
|
2009-08-20 03:26:53 +08:00
|
|
|
;;
|
2010-09-04 02:14:37 +08:00
|
|
|
zcn-1523h-2 | zcn-1523h-5)
|
|
|
|
status_led="zcn-1523h:amber:init"
|
|
|
|
;;
|
2013-10-30 14:50:55 +08:00
|
|
|
wlr8100)
|
|
|
|
status_led="sitecom:amber:status"
|
|
|
|
;;
|
2013-02-18 17:56:27 +08:00
|
|
|
esac
|
2009-08-20 03:26:53 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
set_state() {
|
|
|
|
get_status_led
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
preinit)
|
2013-02-18 17:56:27 +08:00
|
|
|
status_led_blink_preinit
|
2009-08-20 03:26:53 +08:00
|
|
|
;;
|
|
|
|
failsafe)
|
2013-02-18 17:56:27 +08:00
|
|
|
status_led_blink_failsafe
|
2009-08-20 03:26:53 +08:00
|
|
|
;;
|
2014-12-15 18:37:00 +08:00
|
|
|
preinit_regular)
|
|
|
|
status_led_blink_preinit_regular
|
|
|
|
;;
|
2009-08-20 03:26:53 +08:00
|
|
|
done)
|
2011-07-02 03:15:45 +08:00
|
|
|
status_led_on
|
2014-10-14 20:21:36 +08:00
|
|
|
case $(ar71xx_board_name) in
|
|
|
|
qihoo-c301)
|
|
|
|
local n=$(fw_printenv activeregion | cut -d = -f 2)
|
|
|
|
fw_setenv "image${n}trynum" 0
|
|
|
|
;;
|
|
|
|
esac
|
2009-08-20 03:26:53 +08:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|