[PC-BSD Commits] r1458 - pcbsd/trunk/system-overlay/PCBSD/SystemUpdater/bin
svn at pcbsd.org
svn at pcbsd.org
Tue Feb 26 17:38:18 PST 2008
Author: kris
Date: 2008-02-26 17:38:18 -0800 (Tue, 26 Feb 2008)
New Revision: 1458
Modified:
pcbsd/trunk/system-overlay/PCBSD/SystemUpdater/bin/getPBIUpdateStatus.sh
Log:
Updated the script which checks for PBI updates to also echo out the
correct MD5 of the PBI file
Modified: pcbsd/trunk/system-overlay/PCBSD/SystemUpdater/bin/getPBIUpdateStatus.sh
===================================================================
--- pcbsd/trunk/system-overlay/PCBSD/SystemUpdater/bin/getPBIUpdateStatus.sh 2008-02-26 23:50:27 UTC (rev 1457)
+++ pcbsd/trunk/system-overlay/PCBSD/SystemUpdater/bin/getPBIUpdateStatus.sh 2008-02-27 01:38:18 UTC (rev 1458)
@@ -124,9 +124,20 @@
return 255
fi
+# Check to make sure the Mirror: varible exists
+cat ${UPFILE} | grep "MD5:" >/dev/null
+if [ "$?" != "0" ]
+then
+ # Remove the downloaded update data
+ rm ${UPFILE}
+ return 255
+fi
+
+
# Set our variables now
NewVer="`cat ${UPFILE} | grep NewVer: | cut -d ":" -f 2 | cut -d " " -f 2`"
FileLoc="`cat ${UPFILE} | grep FileLoc: | cut -d ":" -f 2 | cut -d " " -f 2`"
+MD5="`cat ${UPFILE} | grep MD5: | cut -d ":" -f 2 | cut -d " " -f 2`"
# Check if we use the mirrors provide by the server or the user specified one
if [ -z "$MIRROROVERRIDE" ]
@@ -144,7 +155,8 @@
echo "NewVer: ${NewVer}
FileURL1: ${Mirror1}${FileLoc}
FileURL2: ${Mirror2}${FileLoc}
-FileURL3: ${Mirror3}${FileLoc}" >&1
+FileURL3: ${Mirror3}${FileLoc}
+MD5: $MD5" >&1
# Remove the downloaded update data
rm ${UPFILE}
More information about the Commits
mailing list