linksys_recovery 557 B

123456789101112131415161718192021
  1. #!/bin/sh /etc/rc.common
  2. # Copyright (C) 2015-2016 OpenWrt.org
  3. # Copyright (C) 2016 LEDE-Project.org
  4. START=97
  5. boot() {
  6. . /lib/functions.sh
  7. . /lib/mvebu.sh
  8. case $(mvebu_board_name) in
  9. armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-xp-linksys-mamba)
  10. # make sure auto_recovery in uboot is always on
  11. AUTO_RECOVERY_ENA="`fw_printenv -n auto_recovery`"
  12. if [ "$AUTO_RECOVERY_ENA" != "yes" ] ; then
  13. fw_setenv auto_recovery yes
  14. fi
  15. # reset the boot counter
  16. mtd resetbc s_env
  17. ;;
  18. esac
  19. }