01_leds 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #!/bin/sh
  2. #
  3. # Copyright (C) 2011-2015 OpenWrt.org
  4. # based on ar71xx
  5. #
  6. . /lib/functions/uci-defaults.sh
  7. . /lib/functions/lantiq.sh
  8. board_config_update
  9. [ -n "$(lantiq_is_dt_led_chosen wifi)" ] && ucidef_set_led_wlan "wifi" "wifi" "$(lantiq_get_dt_led_chosen wifi)" "phy0tpt"
  10. [ -n "$(lantiq_is_dt_led_chosen usb)" ] && ucidef_set_led_usbdev "usb" "usb" "$(lantiq_get_dt_led_chosen usb)" "1-1"
  11. [ -n "$(lantiq_is_dt_led_chosen usb2)" ] && ucidef_set_led_usbdev "usb2" "usb2" "$(lantiq_get_dt_led_chosen usb2)" "2-1"
  12. [ -n "$(lantiq_is_dt_led_chosen internet)" ] && {
  13. interface="nas0"
  14. [ -n "$(lantiq_is_dt_led_chosen dsl)" ] && {
  15. interface="pppoe-wan"
  16. ucidef_set_led_default "dsl" "dsl" "$(lantiq_get_dt_led_chosen dsl)" "0"
  17. }
  18. ucidef_set_led_netdev "internet" "internet" "$(lantiq_get_dt_led_chosen internet)" "$interface"
  19. }
  20. board=$(lantiq_board_name)
  21. case "$board" in
  22. BTHOMEHUBV5A)
  23. ucidef_set_led_default "dimmed" "dimmed" "dimmed" "0"
  24. ;;
  25. VGV7510KW22)
  26. ucidef_set_led_wlan "wifi" "wifi" "vgv7510kw22:green:wlan" "phy0radio"
  27. ;;
  28. VGV7519)
  29. ucidef_set_led_wlan "wifi" "wifi" "vgv7519:green:wireless" "phy0radio"
  30. ;;
  31. P2812HNUF*)
  32. ucidef_set_led_wlan "wifi" "wifi" "p2812hnufx:green:wlan" "phy0radio"
  33. ;;
  34. ARV7519RW22)
  35. ucidef_set_led_netdev "lan" "lan" "arv7519rw22:green:lan" "eth0.1"
  36. ;;
  37. FRITZ7320)
  38. ucidef_set_led_netdev "wifi" "wifi" "fritz7320:green:wlan" "wlan0"
  39. ;;
  40. ARV4525PW)
  41. ucidef_set_led_netdev "wifi" "wifi" "arv4525pw:green:wlan" "wlan0"
  42. ;;
  43. WBMR300)
  44. ucidef_set_led_switch "lan1" "LAN1" "wbmr300:green:lan1" "switch0" "0x08"
  45. ucidef_set_led_switch "lan2" "LAN2" "wbmr300:green:lan2" "switch0" "0x04"
  46. ucidef_set_led_switch "wan" "WAN" "wbmr300:green:wan" "switch0" "0x10"
  47. ucidef_set_led_switch "lan3" "LAN3" "wbmr300:green:lan3" "switch0" "0x20"
  48. ucidef_set_led_default "router" "router" "wbmr300:green:router" "1"
  49. ;;
  50. *)
  51. ;;
  52. esac
  53. board_config_flush
  54. exit 0