251d8ddf65fbed9b48935b8f56a13413195fa739
[openwrt/openwrt.git] / target / linux / ramips / base-files / etc / init.d / bootcount
1 #!/bin/sh /etc/rc.common
2
3 START=99
4
5 start() {
6 . /lib/functions.sh
7
8 case $(board_name) in
9 alfa-network,ac1200rm|\
10 alfa-network,awusfree1|\
11 alfa-network,r36m-e4g|\
12 alfa-network,tube-e4g)
13 [ -n "$(fw_printenv bootcount bootchanged 2>/dev/null)" ] &&\
14 echo -e "bootcount\nbootchanged\n" | /usr/sbin/fw_setenv -s -
15 ;;
16 sk-wb8)
17 fw_setenv bootcount 0
18 ;;
19 esac
20 }