[PC-BSD Commits] r19045 - pcbsd/current/src-sh/pc-thinclient

svn at pcbsd.org svn at pcbsd.org
Tue Sep 11 08:47:21 PDT 2012


Author: kris
Date: 2012-09-11 15:47:20 +0000 (Tue, 11 Sep 2012)
New Revision: 19045

Modified:
   pcbsd/current/src-sh/pc-thinclient/pc-thinclient
Log:

Use libsh with pc-thinclient



Modified: pcbsd/current/src-sh/pc-thinclient/pc-thinclient
===================================================================
--- pcbsd/current/src-sh/pc-thinclient/pc-thinclient	2012-09-11 15:18:36 UTC (rev 19044)
+++ pcbsd/current/src-sh/pc-thinclient/pc-thinclient	2012-09-11 15:47:20 UTC (rev 19045)
@@ -28,6 +28,9 @@
 # Description: Helper script to build / install the necessary bits to turn
 #              a PC-BSD system into a thin-client server 
 
+# Source our functions
+. /usr/local/share/pcbsd/scripts/functions.sh
+
 # Set some universal variables
 PROGDIR="/usr/local/share/pcbsd/pc-thinclient"
 DHCPPORT="net/isc-dhcp42-server"
@@ -251,19 +254,16 @@
 
   # To fetch the jail environment
   echo "Fetching FreeBSD environment... This may take a while..."
-  fetch -o rel.txz ${MIRRORURL}/${SYSVER}/${ARCH}/netinstall/fbsd-release.txz
+  get_file "${MIRRORURL}/${SYSVER}/${ARCH}/netinstall/fbsd-release.txz" "rel.txz" 3
   if [ $? -ne 0 ] ; then
-    echo "Error downloading release files..."
-    exit 1
+    exit_err "Error downloading release files..."
   fi
-  fetch -o rel.md5 ${MIRRORURL}/${SYSVER}/${ARCH}/netinstall/fbsd-release.txz.md5
+  get_file "${MIRRORURL}/${SYSVER}/${ARCH}/netinstall/fbsd-release.txz.md5" "rel.md5" 3
   if [ $? -ne 0 ] ; then
-    echo "Error downloading release files..."
-    exit 1
+    exit_err "Error downloading release files..."
   fi
   if [ `md5 -q rel.txz` != `cat rel.md5` ] ; then
-    echo "Error in download data, checksum mismatch.. Please try again later."
-    exit 1
+    exit_err "Error in download data, checksum mismatch.. Please try again later."
   fi
 
   echo "Extracting PC-BSD environment... This may take a while..."
@@ -330,11 +330,6 @@
 
 }
 
-exit_err() {
-	echo "${0}: ${1}"
-	exit 1
-}
-
 do_removal() {
 	if [ -d "${PXEWORLD}" ] ; then
 		echo "Removing ${PXEWORLD}"



More information about the Commits mailing list