jgstew / tools

various scripts and tools
MIT License
23 stars 14 forks source link

Do not continue on download error (install_bigfix) #10

Closed strawgate closed 8 years ago

strawgate commented 8 years ago

Script currently continues even if the installer fails to download or impartially downloads (it doesnt verify the download either).

Script also seems to continue if the masthead download failed

jgstew commented 8 years ago

Affected Files:

Related:

jgstew commented 8 years ago

How would I "verify" the download? Is it sufficient to fail on download error?

strawgate commented 8 years ago

I think failing on download error is probably sufficient -- they publish SHA256 here: http://support.bigfix.com/bes/release/9.5/patch2/SHA256SUMS which could be used to verify the download.

jgstew commented 8 years ago

part of the problem with verifying the SHA256 before install is that is yet another download, where every download is potentially problematic.

jgstew commented 8 years ago

I do have the file downloads in this script put into a function call, which is much better: https://github.com/jgstew/tools/blob/master/bash/bigfix_newest_version.sh

I'll need to do something like this to put in better handling of downloads.

jgstew commented 8 years ago

This script will help me handle the downloads more gracefully and generically: https://github.com/jgstew/tools/blob/master/bash/download_file.sh

I plan to refine this, and then use it as a function within other scripts like the install_bigfix.sh script so that still there is only a single file to download.

jgstew commented 8 years ago

added some error checking so that the script will stop if one of the downloads failed: https://github.com/jgstew/tools/commit/ecf3c60e86822f0de8bca523084bb1d121b4dad6