2009-08-19 19:26:53 +00:00
|
|
|
#!/bin/sh
|
2013-02-18 09:56:27 +00:00
|
|
|
# Copyright (C) 2009-2013 OpenWrt.org
|
2009-08-19 19:26:53 +00:00
|
|
|
|
2013-02-18 09:56:27 +00:00
|
|
|
. /lib/functions/leds.sh
|
2009-08-19 19:26:53 +00:00
|
|
|
. /lib/ar71xx.sh
|
|
|
|
|
|
|
|
get_status_led() {
|
|
|
|
case $(ar71xx_board_name) in
|
2012-01-01 19:30:25 +00:00
|
|
|
alfa-nx)
|
|
|
|
status_led="alfa:green:led_8"
|
|
|
|
;;
|
2012-08-22 12:33:22 +00:00
|
|
|
all0305)
|
|
|
|
status_led="eap7660d:green:ds4"
|
|
|
|
;;
|
2013-01-29 19:12:32 +00:00
|
|
|
ap132)
|
|
|
|
status_led="ap132:green:status"
|
|
|
|
;;
|
2012-12-26 09:50:36 +00:00
|
|
|
ap136-010|\
|
|
|
|
ap136-020)
|
2012-07-05 08:26:50 +00:00
|
|
|
status_led="ap136:green:status"
|
|
|
|
;;
|
2012-12-29 16:02:27 +00:00
|
|
|
ap135-020)
|
|
|
|
status_led="ap135:green:status"
|
|
|
|
;;
|
2009-08-19 19:26:53 +00:00
|
|
|
ap81)
|
|
|
|
status_led="ap81:green:status"
|
|
|
|
;;
|
|
|
|
ap83)
|
|
|
|
status_led="ap83:green:power"
|
|
|
|
;;
|
2010-09-27 08:59:53 +00:00
|
|
|
ap96)
|
|
|
|
status_led="ap96:green:led2"
|
|
|
|
;;
|
2009-08-19 19:26:53 +00:00
|
|
|
aw-nr580)
|
|
|
|
status_led="aw-nr580:green:ready"
|
|
|
|
;;
|
2010-08-14 07:48:05 +00:00
|
|
|
bullet-m | rocket-m | nano-m | nanostation-m)
|
2009-10-01 19:41:13 +00:00
|
|
|
status_led="ubnt:green:link4"
|
|
|
|
;;
|
2012-10-27 08:55:39 +00:00
|
|
|
cap4200ag)
|
|
|
|
status_led="senao:green:pwr"
|
|
|
|
;;
|
2011-11-12 10:54:10 +00:00
|
|
|
db120)
|
|
|
|
status_led="db120:green:status"
|
|
|
|
;;
|
2013-08-05 10:41:48 +00:00
|
|
|
dir-505-a1 |\
|
2012-01-31 18:37:15 +00:00
|
|
|
dir-600-a1 |\
|
|
|
|
dir-615-e4)
|
|
|
|
status_led="d-link:green:power"
|
2010-01-11 08:02:10 +00:00
|
|
|
;;
|
2009-12-18 12:57:01 +00:00
|
|
|
dir-615-c1)
|
2012-01-31 18:37:15 +00:00
|
|
|
status_led="d-link:green:status"
|
2012-01-31 18:37:09 +00:00
|
|
|
;;
|
2013-03-11 15:55:15 +00:00
|
|
|
dir-825-b1 |\
|
|
|
|
dir-835-a1)
|
2012-01-31 18:37:15 +00:00
|
|
|
status_led="d-link:orange:power"
|
2009-12-03 15:07:34 +00:00
|
|
|
;;
|
2013-01-29 22:50:54 +00:00
|
|
|
dir-825-c1)
|
|
|
|
status_led="d-link:orange:power"
|
|
|
|
;;
|
2010-08-14 21:07:31 +00:00
|
|
|
eap7660d)
|
|
|
|
status_led="eap7660d:green:ds4"
|
|
|
|
;;
|
2011-12-14 20:54:10 +00:00
|
|
|
hornet-ub)
|
|
|
|
status_led="alfa:blue:wps"
|
|
|
|
;;
|
2012-03-16 18:00:34 +00:00
|
|
|
ja76pf | \
|
|
|
|
ja76pf2)
|
2012-03-16 18:00:26 +00:00
|
|
|
status_led="jjplus:green:led1"
|
2010-12-10 17:57:51 +00:00
|
|
|
;;
|
2009-08-19 19:26:53 +00:00
|
|
|
ls-sr71)
|
|
|
|
status_led="ubnt:green:d22"
|
|
|
|
;;
|
2012-11-18 09:32:35 +00:00
|
|
|
mr600)
|
|
|
|
status_led="mr600:orange:power"
|
|
|
|
;;
|
2013-02-01 15:50:45 +00:00
|
|
|
mr600v2)
|
|
|
|
status_led="mr600:blue:power"
|
|
|
|
;;
|
2013-09-19 22:36:41 +00:00
|
|
|
mynet-n600)
|
|
|
|
status_led="wd:blue:power"
|
|
|
|
;;
|
2011-11-01 11:20:47 +00:00
|
|
|
mzk-w04nu | \
|
2009-08-19 19:26:53 +00:00
|
|
|
mzk-w300nh)
|
2011-11-01 11:20:47 +00:00
|
|
|
status_led="planex:green:status"
|
2009-08-19 19:26:53 +00:00
|
|
|
;;
|
2010-12-10 15:17:03 +00:00
|
|
|
nbg460n_550n_550nh)
|
|
|
|
status_led="nbg460n:green:power"
|
|
|
|
;;
|
2012-07-05 08:26:53 +00:00
|
|
|
om2p | \
|
2012-10-17 08:26:01 +00:00
|
|
|
om2p-hs | \
|
2012-07-05 08:26:53 +00:00
|
|
|
om2p-lc)
|
2011-10-27 07:54:51 +00:00
|
|
|
status_led="om2p:blue:power"
|
|
|
|
;;
|
2009-08-19 19:26:53 +00:00
|
|
|
pb44)
|
|
|
|
status_led="pb44:amber:jump1"
|
|
|
|
;;
|
2010-03-05 20:29:24 +00:00
|
|
|
rb-411 | rb-411u | rb-433 | rb-433u | rb-450 | rb-450g | rb-493)
|
|
|
|
status_led="rb4xx:yellow:user"
|
|
|
|
;;
|
2012-04-06 06:45:04 +00:00
|
|
|
rb-750)
|
|
|
|
status_led="rb750:green:act"
|
|
|
|
;;
|
2009-12-15 08:35:11 +00:00
|
|
|
routerstation | routerstation-pro)
|
2009-08-19 19:26:53 +00:00
|
|
|
status_led="ubnt:green:rf"
|
|
|
|
;;
|
2012-01-06 07:20:59 +00:00
|
|
|
rw2458n)
|
|
|
|
status_led="rw2458n:green:d3"
|
|
|
|
;;
|
2009-08-19 19:26:53 +00:00
|
|
|
tew-632brp)
|
|
|
|
status_led="tew-632brp:green:status"
|
|
|
|
;;
|
2012-02-08 16:26:25 +00:00
|
|
|
tew-673gru)
|
|
|
|
status_led="trendnet:blue:wps"
|
|
|
|
;;
|
2012-08-22 20:12:24 +00:00
|
|
|
tew-712br)
|
|
|
|
status_led="trendnet:green:power"
|
|
|
|
;;
|
2012-01-25 07:44:45 +00:00
|
|
|
tl-mr3020)
|
|
|
|
status_led="tp-link:green:wps"
|
|
|
|
;;
|
2011-11-01 11:20:44 +00:00
|
|
|
tl-mr3220 | \
|
2012-12-19 08:50:41 +00:00
|
|
|
tl-mr3220-v2 | \
|
2011-11-01 11:20:44 +00:00
|
|
|
tl-mr3420 | \
|
2013-03-11 15:55:22 +00:00
|
|
|
tl-mr3420-v2 | \
|
2011-11-01 11:20:44 +00:00
|
|
|
tl-wa901nd | \
|
|
|
|
tl-wa901nd-v2 | \
|
2013-03-24 19:23:43 +00:00
|
|
|
tl-wdr3500 | \
|
2012-05-05 17:02:35 +00:00
|
|
|
tl-wr1041n-v2 | \
|
2011-11-01 11:20:44 +00:00
|
|
|
tl-wr1043nd | \
|
|
|
|
tl-wr741nd | \
|
2011-11-01 11:20:52 +00:00
|
|
|
tl-wr741nd-v4 | \
|
2011-11-01 11:20:44 +00:00
|
|
|
tl-wr841n-v1 | \
|
2012-01-04 17:30:57 +00:00
|
|
|
tl-wr841n-v7 | \
|
2012-10-04 20:16:05 +00:00
|
|
|
tl-wr841n-v8 | \
|
2011-11-01 11:20:44 +00:00
|
|
|
tl-wr941nd)
|
|
|
|
status_led="tp-link:green:system"
|
2009-12-08 12:46:30 +00:00
|
|
|
;;
|
2013-05-30 16:23:09 +00:00
|
|
|
archer-c7 | \
|
2013-07-26 07:31:59 +00:00
|
|
|
tl-mr10u | \
|
2013-09-19 17:52:42 +00:00
|
|
|
tl-mr13u | \
|
2012-06-19 11:51:18 +00:00
|
|
|
tl-wdr4300 | \
|
2013-04-26 17:00:49 +00:00
|
|
|
tl-wr703n | \
|
2013-07-28 10:23:33 +00:00
|
|
|
tl-wr710n | \
|
2013-04-26 17:00:49 +00:00
|
|
|
tl-wr720n-v3)
|
2011-11-01 11:20:44 +00:00
|
|
|
status_led="tp-link:blue:system"
|
2009-08-19 19:26:53 +00:00
|
|
|
;;
|
2012-01-07 19:36:35 +00:00
|
|
|
tl-wr2543n)
|
|
|
|
status_led="tp-link:green:wps"
|
|
|
|
;;
|
2010-12-20 17:28:34 +00:00
|
|
|
unifi)
|
|
|
|
status_led="ubnt:green:dome"
|
|
|
|
;;
|
2012-12-17 12:28:11 +00:00
|
|
|
uap-pro)
|
|
|
|
status_led="ubnt:white:dome"
|
|
|
|
;;
|
2011-11-07 12:59:07 +00:00
|
|
|
whr-g301n | \
|
2011-11-01 11:20:46 +00:00
|
|
|
whr-hp-g300n | \
|
2011-11-07 12:59:10 +00:00
|
|
|
whr-hp-gn | \
|
2011-11-01 11:20:46 +00:00
|
|
|
wzr-hp-g300nh)
|
|
|
|
status_led="buffalo:green:router"
|
2011-10-24 21:49:26 +00:00
|
|
|
;;
|
2012-08-01 12:24:52 +00:00
|
|
|
wlae-ag300n)
|
|
|
|
status_led="buffalo:green:status"
|
|
|
|
;;
|
2012-08-29 10:11:55 +00:00
|
|
|
wzr-hp-ag300h | \
|
2013-03-03 21:59:34 +00:00
|
|
|
wzr-hp-g300nh2)
|
2011-12-18 22:20:17 +00:00
|
|
|
status_led="buffalo:red:diag"
|
|
|
|
;;
|
2013-05-08 17:03:42 +00:00
|
|
|
wndap360)
|
|
|
|
status_led="wndap360:green:power"
|
|
|
|
;;
|
2011-12-05 13:03:54 +00:00
|
|
|
wndr3700)
|
2013-09-21 15:55:50 +00:00
|
|
|
status_led="netgear:green:power"
|
2009-11-16 17:31:25 +00:00
|
|
|
;;
|
2012-12-12 16:49:51 +00:00
|
|
|
wndr4300)
|
|
|
|
status_led="netgear:green:power"
|
|
|
|
;;
|
2009-08-19 19:26:53 +00:00
|
|
|
wnr2000)
|
2013-09-21 15:55:51 +00:00
|
|
|
status_led="netgear:green:power"
|
2009-08-19 19:26:53 +00:00
|
|
|
;;
|
2013-09-19 16:56:50 +00:00
|
|
|
wnr2200)
|
2013-09-21 15:55:52 +00:00
|
|
|
status_led="netgear:amber:power"
|
2013-09-19 16:56:50 +00:00
|
|
|
;;
|
2013-07-28 10:23:37 +00:00
|
|
|
wnr612-v2)
|
|
|
|
status_led="wnr612v2:green:power"
|
|
|
|
;;
|
2009-08-19 19:26:53 +00:00
|
|
|
wp543)
|
|
|
|
status_led="wp543:green:diag"
|
|
|
|
;;
|
|
|
|
wrt400n)
|
2011-12-31 13:54:11 +00:00
|
|
|
status_led="wrt400n:blue:wps"
|
2009-08-19 19:26:53 +00:00
|
|
|
;;
|
|
|
|
wrt160nl)
|
2009-09-05 18:46:43 +00:00
|
|
|
status_led="wrt160nl:blue:wps"
|
2009-08-19 19:26:53 +00:00
|
|
|
;;
|
2010-09-03 18:14:37 +00:00
|
|
|
zcn-1523h-2 | zcn-1523h-5)
|
|
|
|
status_led="zcn-1523h:amber:init"
|
|
|
|
;;
|
2013-02-18 09:56:27 +00:00
|
|
|
esac
|
2009-08-19 19:26:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
set_state() {
|
|
|
|
get_status_led
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
preinit)
|
2013-02-18 09:56:27 +00:00
|
|
|
status_led_blink_preinit
|
2009-08-19 19:26:53 +00:00
|
|
|
;;
|
|
|
|
failsafe)
|
2013-02-18 09:56:27 +00:00
|
|
|
status_led_blink_failsafe
|
2009-08-19 19:26:53 +00:00
|
|
|
;;
|
|
|
|
done)
|
2011-07-01 19:15:45 +00:00
|
|
|
status_led_on
|
2009-08-19 19:26:53 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|