fbe19cd77b7cc2682c7daa4d292bad3f29fa98bf
[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 ucidef_set_led_usbdev "usb1" "USB 1" "${board}:white:usb1" "1-1"
25 ucidef_set_led_usbdev "usb2" "USB 2" "${board}:white:usb3" "3-1"
26 ucidef_set_led_netdev "wan" "WAN" "${board}:white:wan" "eth0"
27 ucidef_set_led_ide "esata" "eSATA" "${board}:amber:esata"
28 ucidef_set_led_default "wps" "WPS" "${board}:white:wps" "0"
29 ucidef_set_led_default "rfkill" "rfkill" "${board}:white:rfkill" "0"
30 ;;
31 r7800)
32 ucidef_set_led_usbdev "usb1" "USB 1" "${board}:white:usb1" "2-1"
33 ucidef_set_led_usbdev "usb2" "USB 2" "${board}:white:usb2" "4-1"
34 ucidef_set_led_netdev "wan" "WAN" "${board}:white:wan" "eth0"
35 ucidef_set_led_ide "esata" "eSATA" "${board}:white:esata"
36 ucidef_set_led_wlan "wps" "WPS" "${board}:white:wps" "phy0tpt"
37 ucidef_set_led_wlan "rfkill" "rfkill" "${board}:white:rfkill" "phy1tpt"
38 ;;
39 ea8500)
40 ucidef_set_led_wlan "wifi" "WIFI" "ea8500:green:wifi" "phy0radio"
41 ucidef_set_led_default "wps" "WPS" "ea8500:green:wps" "0"
42 ;;
43 nbg6817)
44 ucidef_set_led_wlan "wlan2g" "WLAN2g" "$board:amber:wifi" "phy1radio"
45 ucidef_set_led_wlan "wlan5g" "WLAN5G" "$board:amber:wifi5" "phy0radio"
46 ucidef_set_led_netdev "wan" "WAN" "$board:white:internet" "eth1"
47 ;;
48 *)
49 ;;
50 esac
51
52 board_config_flush
53
54 exit 0