immortalwrt/target/linux/ipq806x/base-files/etc/init.d/bootcount
Tianling Shen 55fddb6143
ipq806x: rename Xiaomi R3D to Xiaomi Mi Router HD
This makes it constant with other mi router series.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2022-10-13 15:29:57 +08:00

29 lines
662 B
Bash
Executable File

#!/bin/sh /etc/rc.common
START=99
. "$IPKG_INSTROOT/lib/upgrade/asrock.sh"
boot() {
case $(board_name) in
asrock,g10)
asrock_bootconfig_mangle "bootcheck" && reboot
;;
edgecore,ecw5410)
fw_setenv bootcount 0
;;
linksys,ea7500-v1 |\
linksys,ea8500)
mtd resetbc s_env || true
;;
xiaomi,mi-router-hd)
local boot_wait=$( fw_printenv boot_wait | cut -d = -f 2 )
[ "$boot_wait" != "on" ] && fw_setenv boot_wait on
local bootdelay=$( fw_printenv bootdelay | cut -d = -f 2 )
[ "$bootdelay" != "3" ] && fw_setenv bootdelay 3
local uart_en=$( fw_printenv uart_en | cut -d = -f 2 )
[ "$uart_en" != "1" ] && fw_setenv uart_en 1
;;
esac
}