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:
parent
ced2b7bb98
commit
92e60260d5
@ -1,4 +1,5 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
#!/bin/sh /etc/rc.common
|
||||||
|
|
||||||
START=99
|
START=99
|
||||||
|
|
||||||
boot() {
|
boot() {
|
||||||
|
@ -2,9 +2,7 @@
|
|||||||
|
|
||||||
START=99
|
START=99
|
||||||
|
|
||||||
start() {
|
boot() {
|
||||||
. /lib/functions.sh
|
|
||||||
|
|
||||||
case $(board_name) in
|
case $(board_name) in
|
||||||
alfa-network,ap120c-ac)
|
alfa-network,ap120c-ac)
|
||||||
[ -n "$(fw_printenv bootcount changed 2>/dev/null)" ] &&\
|
[ -n "$(fw_printenv bootcount changed 2>/dev/null)" ] &&\
|
||||||
|
@ -2,9 +2,7 @@
|
|||||||
|
|
||||||
START=99
|
START=99
|
||||||
|
|
||||||
start() {
|
boot() {
|
||||||
. /lib/functions.sh
|
|
||||||
|
|
||||||
case $(board_name) in
|
case $(board_name) in
|
||||||
linksys,ea8500)
|
linksys,ea8500)
|
||||||
mtd resetbc s_env || true
|
mtd resetbc s_env || true
|
||||||
|
@ -2,9 +2,7 @@
|
|||||||
|
|
||||||
START=99
|
START=99
|
||||||
|
|
||||||
start() {
|
boot() {
|
||||||
. /lib/functions.sh
|
|
||||||
|
|
||||||
case $(board_name) in
|
case $(board_name) in
|
||||||
linksys,audi|\
|
linksys,audi|\
|
||||||
linksys,viper)
|
linksys,viper)
|
||||||
|
@ -2,9 +2,7 @@
|
|||||||
|
|
||||||
START=99
|
START=99
|
||||||
|
|
||||||
start() {
|
boot() {
|
||||||
. /lib/functions.sh
|
|
||||||
|
|
||||||
case $(board_name) in
|
case $(board_name) in
|
||||||
linksys,caiman |\
|
linksys,caiman |\
|
||||||
linksys,cobra |\
|
linksys,cobra |\
|
||||||
|
@ -2,11 +2,10 @@
|
|||||||
|
|
||||||
START=99
|
START=99
|
||||||
|
|
||||||
start() {
|
boot() {
|
||||||
. /lib/functions.sh
|
case $(board_name) in
|
||||||
|
samknows,whitebox-v8)
|
||||||
local board=$(board_name)
|
|
||||||
if [ $board = "samknows,whitebox-v8" ]; then
|
|
||||||
fw_setenv bootcount 0
|
fw_setenv bootcount 0
|
||||||
fi
|
;;
|
||||||
|
esac
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user