2018-05-06 08:20:11 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
. /lib/functions/uci-defaults.sh
|
|
|
|
|
|
|
|
board_config_update
|
|
|
|
|
|
|
|
board=$(board_name)
|
2018-03-02 18:28:50 +00:00
|
|
|
boardname="${board##*,}"
|
2018-05-06 08:20:11 +00:00
|
|
|
|
|
|
|
case "$board" in
|
2018-03-02 18:28:50 +00:00
|
|
|
"avm,fritz300e")
|
|
|
|
ucidef_set_led_netdev "lan" "LAN" "$boardname:green:lan" "eth0"
|
|
|
|
ucidef_set_rssimon "wlan0" "200000" "1"
|
|
|
|
ucidef_set_led_rssi "rssilow" "RSSILOW" "$boardname:green:rssi0" "wlan0" "1" "100"
|
|
|
|
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "$boardname:green:rssi1" "wlan0" "20" "100"
|
|
|
|
ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "$boardname:green:rssi2" "wlan0" "40" "100"
|
|
|
|
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "$boardname:green:rssi3" "wlan0" "60" "100"
|
|
|
|
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "$boardname:green:rssi4" "wlan0" "80" "100"
|
|
|
|
;;
|
2018-05-07 16:08:00 +00:00
|
|
|
"etactica,eg200")
|
|
|
|
ucidef_set_led_netdev "lan" "LAN" "$boardname:red:eth0" "eth0"
|
|
|
|
ucidef_set_led_oneshot "modbus" "Modbus" "$boardname:red:modbus" "100" "33"
|
|
|
|
ucidef_set_led_default "etactica" "etactica" "$boardname:red:etactica" "ignore"
|
|
|
|
;;
|
2018-06-20 14:21:08 +00:00
|
|
|
"netgear,wnr612-v2"|\
|
|
|
|
"on,n150r")
|
2018-06-20 14:21:07 +00:00
|
|
|
ucidef_set_led_netdev "wan" "WAN" "netgear:green:wan" "eth0"
|
|
|
|
ucidef_set_led_switch "lan1" "LAN1" "netgear:green:lan1" "switch0" "0x02" "0x0f"
|
|
|
|
ucidef_set_led_switch "lan2" "LAN2" "netgear:green:lan2" "switch0" "0x04" "0x0f"
|
|
|
|
;;
|
2018-07-20 20:52:46 +00:00
|
|
|
|
2018-07-28 12:52:39 +00:00
|
|
|
"pcs,cap324")
|
|
|
|
ucidef_set_led_netdev "lan" "LAN" "pcs:lan:green" "eth0"
|
|
|
|
;;
|
|
|
|
|
2018-07-20 20:52:46 +00:00
|
|
|
"pcs,cr5000")
|
|
|
|
ucidef_set_led_usbdev "usb" "USB" "pcs:white:wps" "1-1"
|
|
|
|
;;
|
|
|
|
|
2018-06-29 03:44:58 +00:00
|
|
|
"tplink,re450-v2")
|
|
|
|
ucidef_set_led_netdev "lan_data" "LAN Data" "tp-link:green:lan_data" "eth0" "tx rx"
|
|
|
|
ucidef_set_led_netdev "lan_link" "LAN Link" "tp-link:green:lan_link" "eth0" "link"
|
|
|
|
;;
|
2018-06-08 08:51:00 +00:00
|
|
|
"tplink,tl-mr3020-v1")
|
|
|
|
ucidef_set_led_switch "lan" "LAN" "tp-link:green:lan" "switch0" "0x02"
|
|
|
|
;;
|
2018-06-16 10:37:55 +00:00
|
|
|
"tplink,tl-wr1043nd-v4")
|
|
|
|
ucidef_set_led_switch "wan" "WAN" "tp-link:green:wan" "switch0" "0x20"
|
|
|
|
ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10"
|
|
|
|
ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
|
|
|
|
ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x04"
|
|
|
|
ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
|
|
|
|
;;
|
2018-05-30 13:18:53 +00:00
|
|
|
"tplink,tl-wr740n-v2")
|
|
|
|
ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth0"
|
|
|
|
ucidef_set_led_switch "lan1" "LAN1" "$boardname:green:lan1" "switch0" "0x02"
|
|
|
|
ucidef_set_led_switch "lan2" "LAN2" "$boardname:green:lan2" "switch0" "0x04"
|
|
|
|
ucidef_set_led_switch "lan3" "LAN3" "$boardname:green:lan3" "switch0" "0x08"
|
|
|
|
ucidef_set_led_switch "lan4" "LAN4" "$boardname:green:lan4" "switch0" "0x10"
|
|
|
|
;;
|
2018-07-02 05:02:56 +00:00
|
|
|
"tplink,tl-wr741nd-v4"|\
|
|
|
|
"tplink,tl-wr740nd-v4")
|
|
|
|
ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth1"
|
|
|
|
ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x04"
|
|
|
|
ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
|
|
|
|
ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x10"
|
|
|
|
ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
|
|
|
|
;;
|
2018-07-30 13:21:12 +00:00
|
|
|
"tplink,tl-wr841n-v9")
|
|
|
|
ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth0"
|
|
|
|
ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10"
|
|
|
|
ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
|
|
|
|
ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x04"
|
|
|
|
ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
|
|
|
|
;;
|
2018-05-06 08:20:11 +00:00
|
|
|
esac
|
|
|
|
|
|
|
|
board_config_flush
|
|
|
|
|
|
|
|
exit 0
|