mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-26 06:40:17 +00:00
Non-matching checksums are not always corruption. Actually, they will instead be caused by binaries updated on the remote branch. This is most seen with frequently channging branchs such as development-v6 at this time.
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
fcb98d7e4a
commit
398f90f7f4
1 changed files with 5 additions and 5 deletions
|
@ -2030,7 +2030,7 @@ FTLcheckUpdate() {
|
||||||
# Alt branches don't have a tagged version against them, so just
|
# Alt branches don't have a tagged version against them, so just
|
||||||
# confirm the checksum of the local vs remote to decide whether we
|
# confirm the checksum of the local vs remote to decide whether we
|
||||||
# download or not
|
# download or not
|
||||||
printf " %b FTL binary already installed. Confirming Checksum...\\n" "${INFO}"
|
printf " %b FTL binary already installed, verifying integrity...\\n" "${INFO}"
|
||||||
checkSumFile="https://ftl.pi-hole.net/${ftlBranch}/${binary}.sha1"
|
checkSumFile="https://ftl.pi-hole.net/${ftlBranch}/${binary}.sha1"
|
||||||
# Continue further down...
|
# Continue further down...
|
||||||
else
|
else
|
||||||
|
@ -2061,7 +2061,7 @@ FTLcheckUpdate() {
|
||||||
# If the installed version matches the latest version, then
|
# If the installed version matches the latest version, then
|
||||||
# check the installed sha1sum of the binary vs the remote
|
# check the installed sha1sum of the binary vs the remote
|
||||||
# sha1sum. If they do not match, then download
|
# sha1sum. If they do not match, then download
|
||||||
printf " %b Latest FTL binary already installed (%s). Confirming Checksum...\\n" "${INFO}" "${FTLlatesttag}"
|
printf " %b Latest FTL binary already installed (%s), verifying integrity...\\n" "${INFO}" "${FTLlatesttag}"
|
||||||
checkSumFile="https://github.com/pi-hole/FTL/releases/download/${FTLversion%$'\r'}/${binary}.sha1"
|
checkSumFile="https://github.com/pi-hole/FTL/releases/download/${FTLversion%$'\r'}/${binary}.sha1"
|
||||||
# Continue further down...
|
# Continue further down...
|
||||||
fi
|
fi
|
||||||
|
@ -2078,14 +2078,14 @@ FTLcheckUpdate() {
|
||||||
# Check we downloaded a valid checksum (no 404 or other error like
|
# Check we downloaded a valid checksum (no 404 or other error like
|
||||||
# no DNS resolution)
|
# no DNS resolution)
|
||||||
if [[ ! "${remoteSha1}" =~ ^[a-f0-9]{40}$ ]]; then
|
if [[ ! "${remoteSha1}" =~ ^[a-f0-9]{40}$ ]]; then
|
||||||
printf " %b Remote checksum not available, trying to redownload binary...\\n" "${CROSS}"
|
printf " %b Remote checksum not available, trying to redownload...\\n" "${CROSS}"
|
||||||
return 0
|
return 0
|
||||||
elif [[ "${remoteSha1}" != "${localSha1}" ]]; then
|
elif [[ "${remoteSha1}" != "${localSha1}" ]]; then
|
||||||
printf " %b Corruption detected, redownloading binary...\\n" "${CROSS}"
|
printf " %b Remote binary is different, downloading...\\n" "${CROSS}"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf " %b Checksum correct. No need to download!\\n" "${INFO}"
|
printf " %b Local binary up-to-date. No need to download!\\n" "${INFO}"
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue