bootcount 359 B

1234567891011121314151617181920
  1. #!/bin/sh /etc/rc.common
  2. # SPDX-License-Identifier: GPL-2.0-only
  3. START=99
  4. boot() {
  5. case $(board_name) in
  6. iptime,a6004mx)
  7. if [ `fw_printenv boot_sector` = "boot_sector=B" ]; then
  8. echo "bootcount: boot_sector must be A. Rebooting..."
  9. fw_setenv boot_sector A
  10. reboot
  11. exit 1
  12. fi
  13. ;;
  14. linksys,ea7500-v3)
  15. mtd resetbc s_env || true
  16. ;;
  17. esac
  18. }