X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=functions-update;h=d886f24588391d504872942d6195e817d5027af9;hb=1dad085e4797d5d00ef053d8a31fb41120641cc5;hp=2f2359f368ba3d6e1a3d90b4f2cbbff0fe432f78;hpb=d7900cf1804af891098cd22b0ff32aee9df51969;p=hvlinux.git diff --git a/functions-update b/functions-update index 2f2359f..d886f24 100644 --- a/functions-update +++ b/functions-update @@ -227,6 +227,7 @@ static_getpkg() rm -f ${LFS_PKG_DIR}/${PACK}.${arch_ext} ${WGETCMD} ${URL}/${PACK}.${arch_ext} + wget_status=$? # Failure: if it was a connection timeout, don't try for other file extensions. if grep "failed: Connection timed out" ${WGET_LOG_FILE} 1> /dev/null 2>&1; then @@ -239,7 +240,12 @@ static_getpkg() continue; fi - # If we arrive here, it means we were able to download the file. + if [ ${wget_status} -ne 0 ]; then + echo "Error fetching package ${PACK}.${arch_ext}" + return 1 + fi + + # If we arrive here, it means we were able to successfully download the file. if [ "x${arch_ext}" = "xtar.gz" -o "x${arch_ext}" = "xtgz" -o "x${arch_ext}" = "xtar.Z" ]; then gztobz2 ${LFS_PKG_DIR}/${PACK}.${arch_ext} fi @@ -256,7 +262,7 @@ static_getpkg() # Options: # -e File extension (default is tar.bz2) # -d Fetch directory (default is LFS_PKG_DIR) -# -f Filename (default is PACKAGE) +# -f Filename on server (default is PACKAGE) # -h Display this help and returns # -s Subdirectory on server fpkg()