01_leds 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/bin/sh
  2. #
  3. # Copyright (C) 2015 OpenWrt.org
  4. #
  5. . /lib/functions/uci-defaults.sh
  6. . /lib/ipq806x.sh
  7. board_config_update
  8. board=$(ipq806x_board_name)
  9. case "$board" in
  10. c2600)
  11. ucidef_set_led_usbdev "usb1" "USB 1" "usb_2:blue" "2-1"
  12. ucidef_set_led_usbdev "usb2" "USB 2" "usb_4:blue" "4-1"
  13. ucidef_set_led_netdev "wan" "WAN" "wan:blue" "eth0"
  14. ucidef_set_led_netdev "lan" "LAN" "lan:blue" "br-lan"
  15. ucidef_set_led_default "general" "general" "ledgnr:blue" "1"
  16. ;;
  17. d7800 |\
  18. r7500 |\
  19. r7500v2 |\
  20. r7800)
  21. ucidef_set_led_usbdev "usb1" "USB 1" "${board}:white:usb1" "1-1"
  22. ucidef_set_led_usbdev "usb2" "USB 2" "${board}:white:usb3" "3-1"
  23. ucidef_set_led_netdev "wan" "WAN" "${board}:white:wan" "eth0"
  24. ucidef_set_led_ide "esata" "eSATA" "${board}:amber:esata"
  25. ucidef_set_led_default "wps" "WPS" "${board}:white:wps" "0"
  26. ucidef_set_led_default "rfkill" "rfkill" "${board}:white:rfkill" "0"
  27. ;;
  28. ea8500)
  29. ucidef_set_led_wlan "wifi" "WIFI" "ea8500:green:wifi" "phy0radio"
  30. ucidef_set_led_default "wps" "WPS" "ea8500:green:wps" "0"
  31. ;;
  32. *)
  33. ;;
  34. esac
  35. board_config_flush
  36. exit 0