summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-05-16 07:03:08 +0100
committerLeah Rowe <leah@libreboot.org>2025-05-16 07:03:08 +0100
commit4313b474a593c5b2e57278c590b7cfb56dec5114 (patch)
tree1b5b2139abfd988e879b37f880e169c466a8f036
parentd668f3a35296f0bc7884b18d49f523d7bb331c30 (diff)
vendor.sh: additional safety check
the exit from mkdst can also be non-zero if mv or cp failed, but there's no way to handle that reliably. therefore, the checksum verification should be done one final time, to compensate. Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r--include/vendor.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/vendor.sh b/include/vendor.sh
index 8a71ad5b..7dcf9757 100644
--- a/include/vendor.sh
+++ b/include/vendor.sh
@@ -131,7 +131,7 @@ fetch()
# the given hashsum. So, search for a matching file via bruteforce:
( fx_ "eval mkdst \"$binsum\"" x_ find "${_pre_dest%/*}" -type f ) || :
- [ -f "$_dest" ] && return 0
+ bad_checksum "$binsum" "$_dest" || [ ! -f "$_dest" ] || return 0
[ -z "$binsum" ] && \
printf "'%s', '%s': checksum undefined. Check files in '%s'\n" \
"$board" "$_dest" "${_pre_dest%/*}" 1>&2