aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/mt7620/base-files/etc/init.d
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ramips/mt7620/base-files/etc/init.d')
-rwxr-xr-xtarget/linux/ramips/mt7620/base-files/etc/init.d/bootcount13
1 files changed, 13 insertions, 0 deletions
diff --git a/target/linux/ramips/mt7620/base-files/etc/init.d/bootcount b/target/linux/ramips/mt7620/base-files/etc/init.d/bootcount
new file mode 100755
index 0000000000..c7b6919926
--- /dev/null
+++ b/target/linux/ramips/mt7620/base-files/etc/init.d/bootcount
@@ -0,0 +1,13 @@
+#!/bin/sh /etc/rc.common
+
+START=99
+
+boot() {
+ case $(board_name) in
+ alfa-network,ac1200rm|\
+ alfa-network,tube-e4g)
+ [ -n "$(fw_printenv bootcount bootchanged 2>/dev/null)" ] &&\
+ echo -e "bootcount\nbootchanged\n" | /usr/sbin/fw_setenv -s -
+ ;;
+ esac
+}