. /lib/ramips.sh
get_status_led() {
- case $(ramips_board_name) in
- 3g-6200n)
- status_led="edimax:green:power"
- ;;
- 3g300m | w150m)
- status_led="tenda:blue:ap"
- ;;
- ar725w)
- status_led="ar725w:green:power"
- ;;
- awapn2403)
- status_led="asiarf:green:wps"
- ;;
- argus-atp52b)
- status_led="argus-atp52b:green:run"
- ;;
- asl26555)
- status_led="asl26555:green:power"
- ;;
- br6524n)
- status_led="edimax:blue:power"
- ;;
- br6425 | br-6475nd)
- status_led="edimax:green:power"
- ;;
- cy-swr1100)
- status_led="samsung:blue:wps"
+ board=$(ramips_board_name)
+
+ case $board in
+ 3g150b|\
+ 3g300m|\
+ w150m)
+ status_led="$board:blue:ap"
+ ;;
+ 3g-6200n|\
+ ar670w|\
+ ar725w|\
+ asl26555|\
+ br-6425|\
+ br-6475nd|\
+ dch-m225|\
+ dir-860l-b1|\
+ e1700|\
+ fonera20n|\
+ mzk-750dhp|\
+ mzk-dp150n|\
+ mzk-w300nh2|\
+ nbg-419n|\
+ pwh2004|\
+ wnce2001|\
+ wndr3700v5|\
+ x5|\
+ x8|\
+ xdxrn502j)
+ status_led="$board:green:power"
+ ;;
+ a5-v11|\
+ cs-qr10|\
+ d105|\
+ dcs-930l-b1|\
+ ex2700|\
+ hlk-rm04|\
+ jhr-n825r|\
+ mpr-a1|\
+ mpr-a2|\
+ mzk-ex750np)
+ status_led="$board:red:power"
+ ;;
+ ai-br100|\
+ ht-tm02)
+ status_led="$board:blue:wlan"
;;
- d105)
- status_led="d105:red:power"
+ all0239-3g|\
+ dcs-930|\
+ dir-300-b1|\
+ dir-300-b7|\
+ dir-320-b1|\
+ dir-600-b1|\
+ dir-600-b2|\
+ dir-610-a1|\
+ dir-615-d|\
+ dir-615-h1|\
+ dir-620-a1|\
+ dir-620-d1|\
+ hpm|\
+ hw550-3g|\
+ mac1200rv2|\
+ miniembwifi|\
+ mofi3500-3gn|\
+ rut5xx|\
+ v11st-fe|\
+ vocore|\
+ wmr-300|\
+ zbt-wg2626|\
+ zbt-wg3526)
+ status_led="$board:green:status"
+ ;;
+ atp-52b|\
+ ip2202)
+ status_led="$board:green:run"
;;
- 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)
- status_led="d-link:green:status"
+ awapn2403|\
+ dir-645|\
+ sk-wb8|\
+ wrh-300cr)
+ status_led="$board:green:wps"
;;
- dir-645)
- status_led="d-link:green:wps"
+ c50)
+ status_led="tp-link:blue:power"
;;
- dap-1350)
- status_led="d-link:blue:power"
+ cf-wr800n|\
+ psg1208)
+ status_led="$board:white:wps"
;;
+ cy-swr1100|\
+ w502u)
+ status_led="$board:blue:wps"
+ ;;
+ dap-1350|\
+ na930|\
+ pbr-m1|\
+ rt-n13u|\
+ rt-n14u|\
+ rt-n15|\
+ rt-n56u|\
+ wl-330n|\
+ wl-330n3g|\
+ wli-tx4-ag300n|\
+ wt3020|\
+ y1|\
+ y1s)
+ status_led="$board:blue:power"
+ ;;
+ db-wrt01|\
esr-9753)
- status_led="esr-9753:orange:power"
+ status_led="$board:orange:power"
;;
f5d8235-v2)
- status_led="f5d8235v2:blue:router"
- ;;
- fonera20n)
- status_led="fonera20n:green:power"
- ;;
- ip2202)
- status_led="ip2202:green:run"
+ status_led="$board:blue:router"
;;
- rt-n13u)
- status_led="rt-n13u:power"
+ f7c027|\
+ timecloud)
+ status_led="$board:orange:status"
;;
- hlk-rm04)
- status_led="hlk-rm04:red:power"
+ hc5*61|\
+ jhr-n805r|\
+ jhr-n926r|\
+ mlw221|\
+ mlwg2)
+ status_led="$board:blue:system"
;;
- all0239-3g|\
- hw550-3g)
- status_led="hw550-3g:green:status"
+ linkits7688| \
+ linkits7688d)
+ [ "$1" = "upgrade" ] && status_led="mediatek:orange:wifi"
;;
- m3)
- status_led="m3:blue:status"
+ m2m)
+ status_led="$board:blue:wifi"
;;
+ m3|\
m4)
- status_led="m4:blue:status"
- ;;
- mlw221)
- status_led="kingston:green:status"
+ status_led="$board:blue:status"
;;
- mofi3500-3gn)
- status_led="mofi3500-3gn:green:status"
+ miwifi-mini|\
+ zte-q7)
+ status_led="$board:red:status"
;;
- mpr-a1)
- status_led="mpr-a1:red:power"
- ;;
- mpr-a2)
- status_led="mpr-a2:red:power"
- ;;
- nbg-419n)
- status_led="nbg-419n:green:power"
+ mr-102n)
+ status_led="$board:amber:status"
;;
nw718)
- status_led="nw718:amber:cpu"
+ status_led="$board:amber:cpu"
;;
- omni-emb|\
- omni-emb-hpm)
- status_led="emb:green:status"
+ oy-0001|\
+ sl-r7205|\
+ zbt-we826)
+ status_led="$board:green:wifi"
;;
psr-680w)
- status_led="psr-680w:red:wan"
- ;;
- pwh2004)
- status_led="pwh2004:green:power"
- ;;
- px4885)
- status_led="7links:orange:wifi"
- ;;
- rt-n15)
- status_led="rt-n15:blue:power"
- ;;
- rt-n10-plus)
- status_led="asus:green:wps"
- ;;
- rt-n56u | wl-330n | wl-330n3g)
- status_led="asus:blue:power"
- ;;
- rut5xx)
- status_led="rut5xx:green:status"
- ;;
- sl-r7205)
- status_led="sl-r7205:green:status"
- ;;
+ status_led="$board:red:wan"
+ ;;
+ px-4885|\
+ re6500|\
+ whr-1166d|\
+ whr-300hp2|\
+ whr-600d|\
+ widora-neo)
+ status_led="$board:orange:wifi"
+ ;;
+ mzk-ex300np|\
+ rt-n10-plus|\
tew-691gr|\
- tew-692gr)
- status_led="trendnet:green:wps"
+ tew-692gr|\
+ ur-326n4g|\
+ ur-336un|\
+ wf-2881|\
+ wr512-3gn)
+ status_led="$board:green:wps"
;;
- v11st-fe)
- status_led="v11st-fe:green:status"
+ sap-g3200u3)
+ status_led="$board:green:usb"
;;
v22rw-2x2)
- status_led="v22rw-2x2:green:security"
- ;;
- w306r-v20)
- status_led="w306r-v20:green:sys"
- ;;
- w502u)
- status_led="alfa:blue:wps"
- ;;
- wcr-150gn)
- status_led="wcr150gn:amber:power"
- ;;
- whr-g300n)
- status_led="whr-g300n:green:router"
+ status_led="$board:green:security"
;;
- wmr300 | \
- whr-300hp2 | \
- whr-600d)
- status_led="buffalo:green:status"
- ;;
- wli-tx4-ag300n)
- status_led="buffalo:blue:power"
+ w306r-v20|\
+ witi|\
+ zbt-wr8305rt)
+ status_led="$board:green:sys"
;;
+ wcr-150gn|\
wl-351)
- status_led="wl-351:amber:power"
- ;;
- wr512-3gn)
- status_led="wr512:green:wps"
- ;;
- wr8305rt)
- status_led="wr8305rt:sys"
- ;;
- wnce2001)
- status_led="netgear:green:power"
- ;;
- mzk-w300nh2)
- status_led="mzkw300nh2:green:power"
+ status_led="$board:amber:power"
;;
- ur-326n4g)
- status_led="ur326:green:wps"
+ whr-g300n|\
+ wzr-agl300nh)
+ status_led="$board:green:router"
;;
- ur-336un)
- status_led="ur336:green:wps"
+ wizfi630a)
+ status_led="$board::run"
;;
- x5)
- status_led="x5:green:power"
+ wsr-1166|\
+ wsr-600)
+ status_led="$board:green:power"
;;
- x8)
- status_led="x8:green:power"
- ;;
- xdxrn502j)
- status_led="xdxrn502j:green:power"
- ;;
- f7c027)
- status_led="belkin:orange:status"
- ;;
- na930)
- status_led="na930:blue:power"
+ wrtnode2r | \
+ wrtnode2p | \
+ wrtnode)
+ status_led="wrtnode:blue:indicator"
;;
esac
}
set_state() {
- get_status_led
+ get_status_led $1
case "$1" in
preinit)
failsafe)
status_led_blink_failsafe
;;
+ upgrade | \
+ preinit_regular)
+ status_led_blink_preinit_regular
+ ;;
done)
status_led_on
;;