diag.sh 484 B

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