[PC-BSD Commits] r21880 - pcbsd/current/src-sh/warden/scripts/backend

svn at pcbsd.org svn at pcbsd.org
Sat Mar 16 01:40:52 PDT 2013


Author: kris
Date: 2013-03-16 08:40:51 +0000 (Sat, 16 Mar 2013)
New Revision: 21880

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

Use our fancy-snazzy new downloader for grabbing warden src files on the fly



Modified: pcbsd/current/src-sh/warden/scripts/backend/createjail.sh
===================================================================
--- pcbsd/current/src-sh/warden/scripts/backend/createjail.sh	2013-03-16 08:28:16 UTC (rev 21879)
+++ pcbsd/current/src-sh/warden/scripts/backend/createjail.sh	2013-03-16 08:40:51 UTC (rev 21880)
@@ -165,10 +165,15 @@
 then
   echo "Installing source..."
   mkdir -p "${JAILDIR}/usr/src"
-  if [ ! -e "/usr/src/COPYRIGHT" ] ; then
-     echo "No system-sources on host.. You will need to manually download these in the jail."
+  cd ${JAILDIR}
+  SYSVER="$(uname -r)"
+  get_file_from_mirrors "/${SYSVER}/${ARCH}/dist/src.txz" "src.txz"
+  if [ $? -ne 0 ] ; then
+     echo "Error while downloading the freebsd world."
   else
-    tar cvf - -C /usr/src . 2>/dev/null | tar xvf - -C "${JAILDIR}/usr/src" 2>/dev/null
+    echo "Extracting sources.. May take a while.."
+    tar xvf src.txz -C "${JAILDIR}" 2>/dev/null
+    rm src.txz
     echo "Done"
   fi
 fi



More information about the Commits mailing list