diag.sh 271 B

123456789101112131415161718192021
  1. #!/bin/sh
  2. # Copyright (C) 2010 OpenWrt.org
  3. set_led() {
  4. local state="$1"
  5. [ -f "/proc/adm8668/sesled" ] && echo "$state" > "/proc/adm8668/sesled"
  6. }
  7. set_state() {
  8. case "$1" in
  9. preinit)
  10. set_led 1
  11. ;;
  12. failsafe)
  13. set_led 2
  14. ;;
  15. done)
  16. set_led 0
  17. ;;
  18. esac
  19. }