From 0910f55b9148783dfdbb6c0317b0d9cd4126a5ff Mon Sep 17 00:00:00 2001 From: Manuel Canales Esparcia Date: Tue, 9 May 2006 20:20:25 +0000 Subject: [PATCH] Fixed a bug when the file in the FTP mirror don't match the MD5SUM defined in the book. --- common/common-functions | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/common/common-functions b/common/common-functions index 8e16eeb..b492da8 100644 --- a/common/common-functions +++ b/common/common-functions @@ -729,9 +729,9 @@ get_sources() { # Download file, write name to MISSING_FILES.DMP if # Remove the old file and download a new one rm -fv $FILE # Force generation of MD5SUM and storage in SRC_ARCHIVE - fromARCHIVE=0; HAVEMD5=0 - # Try and retrieve the file - if ! wget -N $URL1 && ! wget -N $URL2 ; then + fromARCHIVE=0; + # Try and retrieve the file. Servers in reverse order. + if ! wget $URL2 && ! wget $URL1 ; then gs_wrt_message "$FILE not found on the servers.. SKIPPING" continue fi @@ -741,6 +741,8 @@ get_sources() { # Download file, write name to MISSING_FILES.DMP if # Validate the MD5SUM one last time if [[ "$HAVEMD5" = "1" ]] && ! echo "$MD5" | md5sum -c - >/dev/null ; then gs_wrt_message "$FILE does not match MD5SUMS value" + # Force generation of MD5SUM + HAVEMD5=0 fi # Generate a fresh MD5SUM for this file