diag.sh 432 B

1234567891011121314151617181920212223242526272829303132
  1. #!/bin/sh
  2. # Copyright (C) 2014 OpenWrt.org
  3. . /lib/functions/leds.sh
  4. . /lib/mvebu.sh
  5. get_status_led() {
  6. case $(mvebu_board_name) in
  7. armada-xp-linksys-mamba)
  8. status_led="mamba:white:power"
  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. }