Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Commit

Permalink
ipq806x: base-files: asrock: fix bootcount include
Browse files Browse the repository at this point in the history
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: af7148a ("ipq806x: add support for ASRock G10")
References: https://gitlab.com/ynezz/openwrt/-/jobs/1243290743#L1444
Signed-off-by: Petr Štetiar <ynezz@true.cz>
  • Loading branch information
ynezz committed May 13, 2021
1 parent b34ee53 commit 6329520
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions target/linux/ipq806x/base-files/etc/init.d/bootcount
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6329520

Please sign in to comment.