[PC-BSD Commits] r19048 - in pcbsd/current/src-sh/warden: bin scripts/backend

svn at pcbsd.org svn at pcbsd.org
Tue Sep 11 10:16:53 PDT 2012


Author: kris
Date: 2012-09-11 17:16:52 +0000 (Tue, 11 Sep 2012)
New Revision: 19048

Modified:
   pcbsd/current/src-sh/warden/bin/warden
   pcbsd/current/src-sh/warden/scripts/backend/functions.sh
Log:

Use libsh for warden



Modified: pcbsd/current/src-sh/warden/bin/warden
===================================================================
--- pcbsd/current/src-sh/warden/bin/warden	2012-09-11 16:48:36 UTC (rev 19047)
+++ pcbsd/current/src-sh/warden/bin/warden	2012-09-11 17:16:52 UTC (rev 19048)
@@ -5,6 +5,9 @@
 # "The Warden" Copyright 2008 PC-BSD Software (iXsystems)
 ######################################################################
 
+# Source external functions
+. /usr/local/share/pcbsd/scripts/functions.sh
+
 require_root() 
 {
   UTEST="`whoami`"

Modified: pcbsd/current/src-sh/warden/scripts/backend/functions.sh
===================================================================
--- pcbsd/current/src-sh/warden/scripts/backend/functions.sh	2012-09-11 16:48:36 UTC (rev 19047)
+++ pcbsd/current/src-sh/warden/scripts/backend/functions.sh	2012-09-11 17:16:52 UTC (rev 19048)
@@ -3,6 +3,9 @@
 ######################################################################
 # DO NOT EDIT 
 
+# Source local functions
+. /usr/local/share/pcbsd/scripts/functions.sh
+
 # Installation directory
 PROGDIR="/usr/local/share/warden"
 
@@ -132,10 +135,13 @@
 
   echo "Fetching jail environment. This may take a while..."
   echo "Downloading ${MIRRORURL}/${SYSVER}/${ARCH}/netinstall/${FBSD_TARBALL} ..."
-  fetch -a ${MIRRORURL}/${SYSVER}/${ARCH}/netinstall/${FBSD_TARBALL} \
-           ${MIRRORURL}/${SYSVER}/${ARCH}/netinstall/${FBSD_TARBALL_CKSUM}
+
+  get_file "${MIRRORURL}/${SYSVER}/${ARCH}/netinstall/${FBSD_TARBALL}" "$FBSD_TARBALL" 3
   [ $? -ne 0 ] && printerror "Error while downloading the portsjail."
 
+  get_file "${MIRRORURL}/${SYSVER}/${ARCH}/netinstall/${FBSD_TARBALL_CKSUM}" "$FBSD_TARBALL_CKSUM" 3
+  [ $? -ne 0 ] && printerror "Error while downloading the portsjail."
+
   [ "$(md5 -q ${FBSD_TARBALL})" != "$(cat ${FBSD_TARBALL_CKSUM})" ] &&
     printerror "Error in download data, checksum mismatch. Please try again later."
 



More information about the Commits mailing list