[PC-BSD Commits] r19044 - pcbsd/current/src-sh/pc-netupdate
svn at pcbsd.org
svn at pcbsd.org
Tue Sep 11 08:18:36 PDT 2012
Author: kris
Date: 2012-09-11 15:18:36 +0000 (Tue, 11 Sep 2012)
New Revision: 19044
Modified:
pcbsd/current/src-sh/pc-netupdate/pc-netupdate
Log:
Add error checking to get_file
Modified: pcbsd/current/src-sh/pc-netupdate/pc-netupdate
===================================================================
--- pcbsd/current/src-sh/pc-netupdate/pc-netupdate 2012-09-11 15:17:14 UTC (rev 19043)
+++ pcbsd/current/src-sh/pc-netupdate/pc-netupdate 2012-09-11 15:18:36 UTC (rev 19044)
@@ -50,10 +50,20 @@
oFile=`mktemp /tmp/.XXXXXXXXXXXX`
get_file "${RURL}" "${oFile}" 3
+ if [ "$?" != "0" ] ; then
+ echo "Failed to download: $RURL"
+ rm $oFile 2>/dev/null >/dev/null
+ return 1
+ fi
# If signed, fetch the key
if [ "$_signed" = "YES" ] ; then
get_file "${RURL}.sha1" "${oFile}.sha1" 3
+ if [ "$?" != "0" ] ; then
+ echo "Failed to download: ${RURL}.sha1"
+ rm $oFile 2>/dev/null >/dev/null
+ return 1
+ fi
openssl dgst -sha1 -verify ${_upDir}/pub.key -signature ${oFile}.sha1 ${oFile} >/dev/null 2>/dev/null
if [ "$?" != "0" ] ; then
More information about the Commits
mailing list