mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 15:32:33 +00:00
ce8af0ace0
Fixes following error while executing the init script on the buildhost:
Enabling boot
./etc/init.d/bootcount: line 5: /lib/upgrade/asrock.sh: No such file or directory
Enabling bootcount
While at it fix following shellcheck issue:
base-files/etc/init.d/bootcount line 11:
if [ $? -eq 0 ]; then
^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.
Cc: Ansuel Smith <ansuelsmth@gmail.com>
Cc: Pawel Dembicki <paweldembicki@gmail.com>
Cc: Christian Lamparter <chunkeey@gmail.com>
Fixes: 98b86296e6
("ipq806x: add support for ASRock G10")
References: https://gitlab.com/ynezz/openwrt/-/jobs/1243290743#L1444
Signed-off-by: Petr Štetiar <ynezz@true.cz>
21 lines
305 B
Bash
Executable File
21 lines
305 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
|
|
;;
|
|
esac
|
|
}
|