2
0
forked from Ivasoft/openwrt

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>
This commit is contained in:
Chuanhong Guo
2019-08-10 19:35:56 +08:00
parent ced2b7bb98
commit 92e60260d5
6 changed files with 10 additions and 18 deletions

View File

@@ -2,11 +2,10 @@
START=99
start() {
. /lib/functions.sh
local board=$(board_name)
if [ $board = "samknows,whitebox-v8" ]; then
boot() {
case $(board_name) in
samknows,whitebox-v8)
fw_setenv bootcount 0
fi
;;
esac
}