6809c549b49edcf6fa813984fa9bd27f89793b4c
[openwrt/openwrt.git] / target / linux / ipq806x / base-files / etc / board.d / 01_leds
1 #!/bin/sh
2 #
3 # Copyright (C) 2015 OpenWrt.org
4 #
5
6 . /lib/functions/uci-defaults.sh
7 . /lib/ipq806x.sh
8
9 board_config_update
10
11 board=$(ipq806x_board_name)
12
13 case "$board" in
14 c2600)
15 ucidef_set_led_usbport "usb1" "USB 1" "${board}:white:usb_2" "usb1-port1" "usb2-port1"
16 ucidef_set_led_usbport "usb2" "USB 2" "${board}:white:usb_4" "usb3-port1" "usb4-port1"
17 ucidef_set_led_netdev "wan" "WAN" "${board}:white:wan" "eth0"
18 ucidef_set_led_netdev "lan" "LAN" "${board}:white:lan" "br-lan"
19 ucidef_set_led_default "general" "general" "${board}:white:ledgnr" "1"
20 ;;
21 d7800 |\
22 r7500 |\
23 r7500v2 |\
24 r7800)
25 ucidef_set_led_usbdev "usb1" "USB 1" "${board}:white:usb1" "1-1"
26 ucidef_set_led_usbdev "usb2" "USB 2" "${board}:white:usb3" "3-1"
27 ucidef_set_led_netdev "wan" "WAN" "${board}:white:wan" "eth0"
28 ucidef_set_led_ide "esata" "eSATA" "${board}:amber:esata"
29 ucidef_set_led_default "wps" "WPS" "${board}:white:wps" "0"
30 ucidef_set_led_default "rfkill" "rfkill" "${board}:white:rfkill" "0"
31 ;;
32 ea8500)
33 ucidef_set_led_wlan "wifi" "WIFI" "ea8500:green:wifi" "phy0radio"
34 ucidef_set_led_default "wps" "WPS" "ea8500:green:wps" "0"
35 ;;
36 nbg6817)
37 ucidef_set_led_wlan "wlan2g" "WLAN2g" "$board:amber:wifi" "phy1radio"
38 ucidef_set_led_wlan "wlan5g" "WLAN5G" "$board:amber:wifi5" "phy0radio"
39 ucidef_set_led_netdev "wan" "WAN" "$board:white:internet" "eth1"
40 ;;
41 *)
42 ;;
43 esac
44
45 board_config_flush
46
47 exit 0