From 05dce64eb7bc166ee8f7395de05da8a47759d46b Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 20 Feb 2016 17:55:31 +0000 Subject: [PATCH] Update MD5 Check --- functions/core_dl.sh | 19 ++++++++++--------- functions/install_dl_ut99.sh | 2 +- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/functions/core_dl.sh b/functions/core_dl.sh index e2b1c61b6..f1a416638 100644 --- a/functions/core_dl.sh +++ b/functions/core_dl.sh @@ -14,21 +14,22 @@ lgsm_version="050216" fn_dl_md5(){ # Runs MD5 Check if available if [ -n "${md5}" ]; then - echo -ne "verifying ${filename} with MD5...\c" - local md5check=$(md5sum "${filedir}/${filename}"|awk '{print $1;}') - if [ "${md5check}" != "${dl_md5}" ]; then + echo -ne "verifying ${filename} with MD5..." + sleep 1 + local md5sumcmd=$(md5sum "${filedir}/${filename}"|awk '{print $1;}') + if [ "${md5sumcmd}" != "${md5}" ]; then fn_printfaileol - echo "${filename} MD5 checksum: ${md5check}" - echo "expected MD5 checksum: ${dl_md5}" + echo "${filename} returned MD5 checksum: ${md5sumcmd}" + echo "expected MD5 checksum: ${md5}" fn_scriptlog "failed to verify ${filename} with MD5" - fn_scriptlog "${filename} MD5 checksum: ${md5check}" - fn_scriptlog "expected MD5 checksum: ${dl_md5}" + fn_scriptlog "${filename} returned MD5 checksum: ${md5sumcmd}" + fn_scriptlog "expected MD5 checksum: ${md5}" exit 1 else fn_printokeol fn_scriptlog "verifyed ${filename} with MD5" - fn_scriptlog "${filename} MD5 checksum: ${md5check}" - fn_scriptlog "expected MD5 checksum: ${dl_md5}" + fn_scriptlog "${filename} returned MD5 checksum: ${md5sumcmd}" + fn_scriptlog "expected MD5 checksum: ${md5}" fi fi } diff --git a/functions/install_dl_ut99.sh b/functions/install_dl_ut99.sh index 8a9157c55..7d8b2fd23 100644 --- a/functions/install_dl_ut99.sh +++ b/functions/install_dl_ut99.sh @@ -8,5 +8,5 @@ echo "" echo "Downloading Server Files" echo "=================================" sleep 1 -fn_fetch_file "http://gameservermanagers.com/files/ut-server-451-complete.tar.bz2" "${lgsmdir}/tmp" "ut-server-451-complete.tar.bz2" "norun" "noforce" "42a8c9806e4fce10a56830caca83ce63" +fn_fetch_file "http://gameservermanagers.com/files/ut-server-451-complete.tar.bz2" "${lgsmdir}/tmp" "ut-server-451-complete.tar.bz2" "norun" "noforce" "e623fdff5ed600a9bfccab852e18d34d" fn_dl_extract "${lgsmdir}/tmp" "ut-server-451-complete.tar.bz2" "${filesdir}" \ No newline at end of file