01_leds 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #!/bin/sh
  2. #
  3. # Copyright (C) 2015 OpenWrt.org
  4. #
  5. . /lib/functions/uci-defaults.sh
  6. board_config_update
  7. board=$(board_name)
  8. case "$board" in
  9. c2600)
  10. ucidef_set_led_usbport "usb1" "USB 1" "${board}:white:usb_2" "usb1-port1" "usb2-port1"
  11. ucidef_set_led_usbport "usb2" "USB 2" "${board}:white:usb_4" "usb3-port1" "usb4-port1"
  12. ucidef_set_led_switch "wan" "wan" "${board}:white:wan" "switch0" "0x20"
  13. ucidef_set_led_switch "lan" "lan" "${board}:white:lan" "switch0" "0x1e"
  14. ;;
  15. d7800 |\
  16. r7500 |\
  17. r7500v2 |\
  18. r7800)
  19. ucidef_set_led_usbport "usb1" "USB 1" "${board}:white:usb1" "usb1-port1" "usb2-port1"
  20. ucidef_set_led_usbport "usb2" "USB 2" "${board}:white:usb2" "usb3-port1" "usb4-port1"
  21. ucidef_set_led_netdev "wan" "WAN" "${board}:white:wan" "eth0"
  22. ucidef_set_led_ide "esata" "eSATA" "${board}:white:esata"
  23. ;;
  24. fritz4040)
  25. ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan" "phy0tpt" "phy1tpt"
  26. ucidef_set_led_netdev "wan" "WAN" "$board:green:wan" "eth1"
  27. ucidef_set_led_switch "lan" "LAN" "${board}:green:lan" "switch0" "0x1e"
  28. ;;
  29. nbg6817)
  30. ucidef_set_led_wlan "wlan2g" "WLAN2G" "$board:amber:wifi2g" "phy1tpt"
  31. ucidef_set_led_wlan "wlan5g" "WLAN5G" "$board:amber:wifi5g" "phy0tpt"
  32. ucidef_set_led_netdev "wan" "WAN" "$board:white:internet" "eth1"
  33. ;;
  34. vr2600v)
  35. ucidef_set_led_usbport "usb" "USB" "${board}:white:usb" "usb1-port1" "usb2-port1" "usb3-port1" "usb4-port1"
  36. ucidef_set_led_switch "lan" "lan" "${board}:white:lan" "switch0" "0x1e"
  37. ucidef_set_led_wlan "wlan2g" "WLAN2G" "${board}:white:wlan2g" "phy0tpt"
  38. ucidef_set_led_wlan "wlan5g" "WLAN5G" "${board}:white:wlan5g" "phy1tpt"
  39. ucidef_set_led_switch "wan" "wan" "${board}:white:wan" "switch0" "0x20"
  40. ;;
  41. *)
  42. ;;
  43. esac
  44. board_config_flush
  45. exit 0