01_leds 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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_usbport "usb1" "USB 1" "${board}:white:usb_2" "usb1-port1" "usb2-port1"
  12. ucidef_set_led_usbport "usb2" "USB 2" "${board}:white:usb_4" "usb3-port1" "usb4-port1"
  13. ucidef_set_led_switch "wan" "wan" "${board}:white:wan" "switch0" "0x20"
  14. ucidef_set_led_switch "lan" "lan" "${board}:white:lan" "switch0" "0x1e"
  15. ;;
  16. d7800 |\
  17. r7500 |\
  18. r7500v2 |\
  19. r7800)
  20. ucidef_set_led_usbport "usb1" "USB 1" "${board}:white:usb1" "usb1-port1" "usb2-port1"
  21. ucidef_set_led_usbport "usb2" "USB 2" "${board}:white:usb2" "usb3-port1" "usb4-port1"
  22. ucidef_set_led_netdev "wan" "WAN" "${board}:white:wan" "eth0"
  23. ucidef_set_led_ide "esata" "eSATA" "${board}:white:esata"
  24. ;;
  25. nbg6817)
  26. ucidef_set_led_wlan "wlan2g" "WLAN2G" "$board:amber:wifi2g" "phy1tpt"
  27. ucidef_set_led_wlan "wlan5g" "WLAN5G" "$board:amber:wifi5g" "phy0tpt"
  28. ucidef_set_led_netdev "wan" "WAN" "$board:white:internet" "eth1"
  29. ;;
  30. vr2600v)
  31. ucidef_set_led_usbport "usb" "USB" "${board}:white:usb" "usb1-port1" "usb2-port1" "usb3-port1" "usb4-port1"
  32. ucidef_set_led_switch "lan" "lan" "${board}:white:lan" "switch0" "0x1e"
  33. ucidef_set_led_wlan "wlan2g" "WLAN2G" "${board}:white:wlan2g" "phy0tpt"
  34. ucidef_set_led_wlan "wlan5g" "WLAN5G" "${board}:white:wlan5g" "phy1tpt"
  35. ucidef_set_led_switch "wan" "wan" "${board}:white:wan" "switch0" "0x20"
  36. ;;
  37. *)
  38. ;;
  39. esac
  40. board_config_flush
  41. exit 0