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>
-start() {
- . /lib/functions.sh
-
case $(board_name) in
alfa-network,ap120c-ac)
[ -n "$(fw_printenv bootcount changed 2>/dev/null)" ] &&\
case $(board_name) in
alfa-network,ap120c-ac)
[ -n "$(fw_printenv bootcount changed 2>/dev/null)" ] &&\
-start() {
- . /lib/functions.sh
-
case $(board_name) in
linksys,ea8500)
mtd resetbc s_env || true
case $(board_name) in
linksys,ea8500)
mtd resetbc s_env || true
-start() {
- . /lib/functions.sh
-
case $(board_name) in
linksys,audi|\
linksys,viper)
case $(board_name) in
linksys,audi|\
linksys,viper)
-start() {
- . /lib/functions.sh
-
case $(board_name) in
linksys,caiman |\
linksys,cobra |\
case $(board_name) in
linksys,caiman |\
linksys,cobra |\
-start() {
- . /lib/functions.sh
-
- local board=$(board_name)
- if [ $board = "samknows,whitebox-v8" ]; then
+boot() {
+ case $(board_name) in
+ samknows,whitebox-v8)