ipq806x: base-files: asrock: fix bootcount include
[openwrt/staging/zorun.git] / target / linux / ipq806x / base-files / etc / init.d / bootcount
index 7a54c34dbaca433320e594e86fbb605914750d55..cb32a4ed3568d8dbd86e22746b76de7f4df3f638 100755 (executable)
@@ -2,15 +2,12 @@
 
 START=99
 
-. /lib/upgrade/asrock.sh
+. "$IPKG_INSTROOT/lib/upgrade/asrock.sh"
 
 boot() {
        case $(board_name) in
        asrock,g10)
-               asrock_bootconfig_mangle "bootcheck"
-               if [ $? -eq 0 ]; then
-                       reboot
-               fi
+               asrock_bootconfig_mangle "bootcheck" && reboot
                ;;
        edgecore,ecw5410)
                fw_setenv bootcount 0