| 123456789101112131415161718192021222324252627282930 |
- #!/bin/sh /etc/rc.common
- # SPDX-License-Identifier: GPL-2.0-only
- START=99
- boot() {
- case $(board_name) in
- xiaomi,mi-router-ax3000t)
- . /lib/upgrade/common.sh
- [ "$(rootfs_type)" = "tmpfs" ] && \
- logger "bootcount: initramfs mode detected, exit" && \
- return 0
- [ "$(fw_printenv -n flag_try_sys2_failed 2>&1)" = "8" ] && \
- logger "bootcount: rd03 model detected, exit" && \
- return 0
- fw_setenv -s - <<-EOF
- flag_boot_rootfs 0
- flag_boot_success 1
- flag_last_success 0
- flag_ota_reboot 0
- flag_try_sys1_failed 0
- flag_try_sys2_failed 0
- EOF
- logger "bootcount: rd23 model detected, nvram was updated"
- ;;
- zyxel,ex5700-telenor)
- fw_setenv uboot_bootcount 0
- ;;
- esac
- }
|