mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-29 09:32:34 +00:00
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>
27 lines
443 B
Bash
Executable File
27 lines
443 B
Bash
Executable File
#!/bin/sh /etc/rc.common
|
|
|
|
START=99
|
|
|
|
boot() {
|
|
case "$(board_name)" in
|
|
hfcl,ion4xe|\
|
|
hfcl,ion4x|\
|
|
hfcl,ion4x_2|\
|
|
hfcl,ion4xi_w|\
|
|
hfcl,ion4x_w|\
|
|
hfcl,ion4xi_HMR|\
|
|
hfcl,ion4xi_wp|\
|
|
hfcl,ion4xi)
|
|
fw_setenv boot_count 0
|
|
;;
|
|
edgecore,eap101|\
|
|
edgecore,eap102|\
|
|
edgecore,oap102|\
|
|
edgecore.eap104)
|
|
avail=$(fw_printenv -n upgrade_available)
|
|
[ "${avail}" -eq 1 ] || fw_setenv upgrade_available 1
|
|
fw_setenv bootcount 0
|
|
;;
|
|
esac
|
|
}
|