ipq40xx: add support for ALFA Network AP120C-AC
[openwrt/staging/dedeckeh.git] / target / linux / ipq40xx / base-files / etc / init.d / bootcount
diff --git a/target/linux/ipq40xx/base-files/etc/init.d/bootcount b/target/linux/ipq40xx/base-files/etc/init.d/bootcount
new file mode 100755 (executable)
index 0000000..604f88c
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh /etc/rc.common
+
+START=99
+
+start() {
+       . /lib/functions.sh
+
+       case $(board_name) in
+       alfa-network,ap120c-ac)
+               [ -n "$(fw_printenv bootcount changed 2>/dev/null)" ] &&\
+                       echo -e "bootcount\nchanged\n" | /usr/sbin/fw_setenv -s -
+               ;;
+       esac
+}