Files
wlan-ap/feeds/ipq807x_v5.4/ipq60xx/base-files/etc/init.d/bootcount
Paul White 16ebb7cec3 eap-104: fix dualboot: reset bootcount
The bootcount wasn't getting reset to 0 upon a successful boot,
resulting in falling back to the previous firmware version after three
reboots of the AP.

Fixes: WIFI-13359
Signed-off-by: Paul White <paul@shasta.cloud>
2024-02-06 10:26:52 +01:00

21 lines
341 B
Bash
Executable File

#!/bin/sh /etc/rc.common
START=99
boot() {
case "$(board_name)" in
hfcl,ion4xe|\
hfcl,ion4xi)
fw_setenv boot_count 0
;;
edgecore,eap101|\
edgecore,eap102|\
edgecore,oap102|\
edgecore.eap104)
avail=$(fw_printenv -n upgrade_available)
[ ${avail} -eq 0 ] && fw_setenv upgrade_available 1
fw_setenv bootcount 0
;;
esac
}