immortalwrt/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount

19 lines
339 B
Plaintext
Raw Normal View History

2019-12-08 12:13:33 +08:00
#!/bin/sh /etc/rc.common
START=99
boot() {
2019-12-08 12:13:33 +08:00
case $(board_name) in
alfa-network,quad-e4g)
2019-12-08 12:13:33 +08:00
[ -n "$(fw_printenv bootcount bootchanged 2>/dev/null)" ] &&\
echo -e "bootcount\nbootchanged\n" | /usr/sbin/fw_setenv -s -
;;
linksys,ea7500-v2)
mtd resetbc s_env || true
;;
samknows,whitebox-v8)
2019-12-08 12:13:33 +08:00
fw_setenv bootcount 0
;;
esac
}