diag.sh 701 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #!/bin/sh
  2. # Copyright (C) 2014-2016 OpenWrt.org
  3. . /lib/functions/leds.sh
  4. . /lib/mvebu.sh
  5. get_status_led() {
  6. case $(mvebu_board_name) in
  7. armada-385-linksys-caiman)
  8. status_led="caiman:white:power"
  9. ;;
  10. armada-385-linksys-cobra)
  11. status_led="cobra:white:power"
  12. ;;
  13. armada-385-linksys-rango)
  14. status_led="rango:white:power"
  15. ;;
  16. armada-385-linksys-shelby)
  17. status_led="shelby:white:power"
  18. ;;
  19. armada-xp-linksys-mamba)
  20. status_led="mamba:white:power"
  21. ;;
  22. esac
  23. }
  24. set_state() {
  25. get_status_led
  26. case "$1" in
  27. preinit)
  28. status_led_blink_preinit
  29. ;;
  30. failsafe)
  31. status_led_blink_failsafe
  32. ;;
  33. preinit_regular)
  34. status_led_blink_preinit_regular
  35. ;;
  36. done)
  37. status_led_on
  38. ;;
  39. esac
  40. }