routeros_firmware: Give error if checksum fetch fails
This commit is contained in:
parent
604ae20554
commit
50f02e85ac
1 changed files with 4 additions and 0 deletions
|
@ -31,6 +31,10 @@ fi
|
|||
|
||||
checksum="$(curl -sSf "https://mikrotik.com/download" | \
|
||||
sed -n 's/.*routeros-[0-9\.]*-arm\.npk<\/td>.*<td>SHA256<\/td><td>\(.*\)<\/td>.*/\1/p')"
|
||||
if [ -z "$checksum" ]; then
|
||||
echo "ERR: Failed to determine package checksum" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Downloading new package '${packagename}'"
|
||||
trap 'rm -f -- "${packagename}.tmp"' EXIT
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue