2011-10-25 05:49:31 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
2012-05-30 00:39:18 +08:00
|
|
|
. /lib/functions/uci-defaults.sh
|
2011-10-25 05:49:31 +08:00
|
|
|
. /lib/ramips.sh
|
|
|
|
|
|
|
|
set_usb_led() {
|
2012-05-30 00:39:18 +08:00
|
|
|
ucidef_set_led_usbdev "usb" "USB" "$1" "1-1"
|
2011-10-25 05:49:31 +08:00
|
|
|
}
|
|
|
|
|
2011-12-23 22:27:10 +08:00
|
|
|
set_wifi_led() {
|
2012-05-30 00:39:18 +08:00
|
|
|
ucidef_set_led_netdev "wifi_led" "wifi" "$1" "wlan0"
|
2012-05-30 00:39:03 +08:00
|
|
|
}
|
|
|
|
|
2011-10-25 05:49:31 +08:00
|
|
|
board=$(ramips_board_name)
|
|
|
|
|
|
|
|
case $board in
|
2012-07-12 21:29:46 +08:00
|
|
|
3g-6200n)
|
|
|
|
set_wifi_led "edimax:amber:wlan"
|
|
|
|
set_usb_led "edimax:blue:3g"
|
|
|
|
;;
|
2013-04-03 18:00:03 +08:00
|
|
|
3g-6200nl)
|
|
|
|
set_wifi_led "edimax:green:wlan"
|
|
|
|
;;
|
2013-01-20 01:05:06 +08:00
|
|
|
3g300m)
|
|
|
|
set_usb_led "tenda:blue:3g"
|
|
|
|
;;
|
2012-12-30 01:50:32 +08:00
|
|
|
air3gii)
|
|
|
|
set_wifi_led "airlive:green:wlan"
|
|
|
|
set_usb_led "airlive:green:mobile"
|
|
|
|
;;
|
2012-01-24 19:48:47 +08:00
|
|
|
all0256n)
|
2012-08-22 17:46:30 +08:00
|
|
|
ucidef_set_rssimon "wlan0" "40000" "1"
|
|
|
|
ucidef_set_led_rssi "rssilow" "RSSILOW" "all0256n:green:rssilow" "wlan0" "1" "40" "0" "6"
|
|
|
|
ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "all0256n:green:rssimed" "wlan0" "30" "80" "-29" "5"
|
|
|
|
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "all0256n:green:rssihigh" "wlan0" "70" "100" "-69" "8"
|
2012-01-24 19:48:47 +08:00
|
|
|
set_wifi_led "rt2800pci-phy0::radio"
|
|
|
|
;;
|
2013-04-26 03:02:53 +08:00
|
|
|
asl26555)
|
|
|
|
ucidef_set_led_default "power" "POWER" "asl26555:green:power" "1"
|
|
|
|
ucidef_set_led_netdev "eth" "ETH" "asl26555:green:eth" "eth0"
|
|
|
|
set_wifi_led "asl26555:green:wlan"
|
|
|
|
set_usb_led "asl26555:green:3g"
|
|
|
|
;;
|
2011-10-25 05:49:36 +08:00
|
|
|
bc2)
|
|
|
|
set_usb_led "bc2:blue:usb"
|
|
|
|
;;
|
2013-02-03 01:01:50 +08:00
|
|
|
br6425)
|
|
|
|
set_wifi_led "edimax:orange:wlan"
|
|
|
|
;;
|
2012-12-10 22:13:01 +08:00
|
|
|
broadway)
|
|
|
|
set_usb_led "red:diskmounted"
|
|
|
|
set_wifi_led "red:wps_active"
|
|
|
|
;;
|
2013-01-06 19:11:42 +08:00
|
|
|
br6524n)
|
|
|
|
set_wifi_led "edimax:blue:wlan"
|
|
|
|
;;
|
2013-04-03 18:00:08 +08:00
|
|
|
d105)
|
|
|
|
ucidef_set_led_default "power" "POWER" "d105:red:power" "1"
|
|
|
|
set_usb_led "d105:green:usb"
|
|
|
|
;;
|
2012-05-30 00:39:03 +08:00
|
|
|
dir-300-b1|\
|
|
|
|
dir-600-b1|\
|
2012-08-12 20:48:24 +08:00
|
|
|
dir-600-b2|\
|
|
|
|
dir-620-a1)
|
2012-05-30 00:39:03 +08:00
|
|
|
# ANDed with vlan switch port 4 led state
|
2012-05-30 00:39:18 +08:00
|
|
|
ucidef_set_led_default "wan" "WAN LED (amber)" "d-link:amber:wan" "1"
|
2012-08-12 20:48:24 +08:00
|
|
|
set_wifi_led "rt2800pci-phy0::radio"
|
2012-05-30 00:39:03 +08:00
|
|
|
;;
|
2012-11-25 22:25:27 +08:00
|
|
|
dir-615-d|\
|
2012-08-18 01:56:05 +08:00
|
|
|
dir-615-h1)
|
|
|
|
ucidef_set_led_default "status" "Status LED (amber)" "d-link:amber:status" "0"
|
|
|
|
set_wifi_led "rt2800pci-phy0::radio"
|
|
|
|
;;
|
2013-04-26 03:02:48 +08:00
|
|
|
dir-620-d1)
|
|
|
|
set_wifi_led "d-link:green:wifi"
|
|
|
|
;;
|
2013-08-15 02:15:35 +08:00
|
|
|
dir-810l)
|
|
|
|
ucidef_set_led_default "power" "POWER" "dlink:green:power" "1"
|
|
|
|
;;
|
2013-08-15 03:35:27 +08:00
|
|
|
dir-610-a1 |\
|
2013-09-19 00:31:37 +08:00
|
|
|
dir-300-b7 |\
|
|
|
|
dir-320-b1 |\
|
2011-12-23 22:27:10 +08:00
|
|
|
esr-9753)
|
|
|
|
set_wifi_led "rt2800pci-phy0::radio"
|
|
|
|
;;
|
2012-01-23 18:23:32 +08:00
|
|
|
f5d8235-v1)
|
|
|
|
set_usb_led "f5d8235-v1:blue:storage"
|
|
|
|
;;
|
|
|
|
f5d8235-v2)
|
|
|
|
set_usb_led "f5d8235v2:blue:storage"
|
|
|
|
;;
|
2011-10-25 05:49:31 +08:00
|
|
|
fonera20n)
|
2012-07-25 04:38:31 +08:00
|
|
|
set_usb_led "fonera20n:orange:usb"
|
|
|
|
set_wifi_led "fonera20n:orange:wifi"
|
2011-10-25 05:49:31 +08:00
|
|
|
;;
|
2012-08-18 01:56:07 +08:00
|
|
|
all0239-3g|\
|
2011-10-25 05:49:31 +08:00
|
|
|
hw550-3g)
|
|
|
|
set_usb_led "hw550-3g:green:usb"
|
|
|
|
;;
|
|
|
|
mofi3500-3gn)
|
|
|
|
set_usb_led "mofi3500-3gn:green:usb"
|
|
|
|
;;
|
2013-07-27 17:23:52 +08:00
|
|
|
mpr-a1)
|
|
|
|
set_wifi_led "mpr-a1:blue:system"
|
|
|
|
;;
|
2013-06-10 16:24:56 +08:00
|
|
|
mpr-a2)
|
|
|
|
set_wifi_led "mpr-a2:blue:system"
|
|
|
|
;;
|
2012-12-30 01:50:38 +08:00
|
|
|
mzk-w300nh2)
|
|
|
|
set_wifi_led "mzkw300nh2:amber:wlan"
|
|
|
|
;;
|
2011-10-25 05:49:31 +08:00
|
|
|
nw718)
|
|
|
|
set_usb_led "nw718:amber:usb"
|
|
|
|
;;
|
2013-02-03 01:21:05 +08:00
|
|
|
omni-emb-hpm)
|
|
|
|
ucidef_set_led_default "power" "POWER" "emb:orange:power" "1"
|
|
|
|
ucidef_set_led_netdev "eth" "ETH" "emb:green:eth" "eth0"
|
|
|
|
set_wifi_led "emb:green:wifi"
|
|
|
|
;;
|
2012-02-20 00:44:49 +08:00
|
|
|
sl-r7205)
|
|
|
|
set_wifi_led "rt2800pci-phy0::radio"
|
|
|
|
;;
|
2012-02-16 05:13:11 +08:00
|
|
|
v11st-fe)
|
|
|
|
set_wifi_led "rt2800pci-phy0::radio"
|
|
|
|
;;
|
2012-04-21 20:30:40 +08:00
|
|
|
w306r-v20)
|
|
|
|
set_wifi_led "rt2800pci-phy0::radio"
|
|
|
|
;;
|
2011-12-28 16:43:32 +08:00
|
|
|
w502u)
|
|
|
|
set_usb_led "alfa:blue:usb"
|
|
|
|
set_wifi_led "rt2800pci-phy0::radio"
|
|
|
|
;;
|
2012-01-23 18:23:32 +08:00
|
|
|
wcr-150gn)
|
|
|
|
set_usb_led "wcr150gn:amber:user"
|
|
|
|
;;
|
2013-07-22 23:36:39 +08:00
|
|
|
hg255d)
|
|
|
|
set_wifi_led "hg255d:wlan"
|
|
|
|
set_usb_led "hg255d:usb"
|
|
|
|
ucidef_set_led_netdev "eth" "Internet" "hg255d:internet" "eth0.2"
|
|
|
|
;;
|
2013-04-09 22:19:33 +08:00
|
|
|
wnce2001)
|
|
|
|
set_wifi_led "netgear:green:wlan"
|
|
|
|
;;
|
2013-08-15 02:15:35 +08:00
|
|
|
rp-n53)
|
|
|
|
ucidef_set_led_netdev "eth" "Network" "asus:white:back" "eth0"
|
|
|
|
set_wifi_led "asus:blue:wifi"
|
|
|
|
;;
|
2013-10-28 14:47:31 +08:00
|
|
|
whr-300hp2 |\
|
|
|
|
whr-600d)
|
|
|
|
ucidef_set_led_default "power" "power" "buffalo:green:power" "1"
|
|
|
|
ucidef_set_led_default "router" "router" "buffalo:green:router" "1"
|
|
|
|
;;
|
2011-10-25 05:49:31 +08:00
|
|
|
esac
|
2012-05-30 00:39:18 +08:00
|
|
|
|
|
|
|
ucidef_commit_leds
|
|
|
|
|
|
|
|
exit 0
|