1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-06-14 03:03:52 +02:00
openwrt/target/linux/ipq40xx/base-files/etc/init.d/bootcount
Chuanhong Guo 92e60260d5 treewide: sync bootcount scripts across targets
This commit made the following changes to sync all bootcount scripts:

1. use boot() instead of start()
    This script only needs to be executed once when boot is complete.
    use boot() to make this explicit.

2. drop sourcing of /lib/functions.sh
    This is aready done in /etc/rc.common.

3. ramips: replace board name checking with a case

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2019-08-17 23:52:34 +08:00

17 lines
297 B
Bash
Executable File

#!/bin/sh /etc/rc.common
START=99
boot() {
case $(board_name) in
alfa-network,ap120c-ac)
[ -n "$(fw_printenv bootcount changed 2>/dev/null)" ] &&\
echo -e "bootcount\nchanged\n" | /usr/sbin/fw_setenv -s -
;;
linksys,ea6350v3|\
linksys,ea8300)
mtd resetbc s_env || true
;;
esac
}