ramips: support dual image feature on ALFA Network boards
[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,tube-e4g)
12 [ -n "$(fw_printenv bootcount bootchanged 2>/dev/null)" ] &&\
13 echo -e "bootcount\nbootchanged\n" | /usr/sbin/fw_setenv -s -
14 ;;
15 sk-wb8)
16 fw_setenv bootcount 0
17 ;;
18 esac
19 }