16 Jun 2012 16:43
[qmailtoaster-devel] Download script with SHA1 verification
Ron Pacheco <ron <at> pacheco.net>
2012-06-16 14:43:33 GMT
2012-06-16 14:43:33 GMT
Devel, Attached is my first shot at a download script that: (1) Makes 10 retry attempts on a file; in the long run probably overkill, but right now with some mirror issues, it should be enough attempts to resolve any problems. (2) Verifies a download against an SHA1 checksum. A checksum fail is simply considered a download fail and the download will be reattempted up to the retry limit. (On a checksum fail, both the srpm and sha1 file are removed before the retry, under the premise that either one could have been corrupt on download.) I tested this extensively on my own servers, but I obviously could not test against the live servers since there are no SHA1 checksum files on the live download mirrors at present. Well, not that I know of. ;) The script assumes the standard convention of the SHA1 file being name file.ext.sha1 for a file named file.ext. Cheers, Ron
#!/bin/sh # To sha1sum or not to sha1sum if [ "$1" = "-nosha1" ]; then(Continue reading)
RSS Feed