diag.sh 480 B

1234567891011121314151617181920212223242526272829303132333435
  1. #!/bin/sh
  2. # Copyright (C) 2013 OpenWrt.org
  3. . /lib/functions/leds.sh
  4. . /lib/mpc85xx.sh
  5. get_status_led() {
  6. case $(mpc85xx_board_name) in
  7. tl-wdr4900-v1)
  8. status_led="tp-link:blue:system"
  9. ;;
  10. esac
  11. }
  12. set_state() {
  13. get_status_led
  14. case "$1" in
  15. preinit)
  16. status_led_blink_preinit
  17. ;;
  18. failsafe)
  19. status_led_blink_failsafe
  20. ;;
  21. preinit_regular)
  22. status_led_blink_preinit_regular
  23. ;;
  24. done)
  25. status_led_on
  26. ;;
  27. esac
  28. }