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

svn at pcbsd.org svn at pcbsd.org
Fri Jul 6 06:29:35 PDT 2012


Author: kris
Date: 2012-07-06 13:29:33 +0000 (Fri, 06 Jul 2012)
New Revision: 17661

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

Change jail creation a bit, first do sanity checks, then download 
world txz file, before starting to create actual jail directories. That
way we have a sane path of failure if something goes wrong



Modified: pcbsd/current/src-sh/warden/scripts/backend/createjail.sh
===================================================================
--- pcbsd/current/src-sh/warden/scripts/backend/createjail.sh	2012-07-06 11:49:57 UTC (rev 17660)
+++ pcbsd/current/src-sh/warden/scripts/backend/createjail.sh	2012-07-06 13:29:33 UTC (rev 17661)
@@ -70,7 +70,6 @@
   exit 6
 fi
 
-
 JAILDIR="${JDIR}/${IP}"
 set_warden_metadir
 
@@ -90,6 +89,9 @@
   fi
 done
 
+# Check if we need to download the chroot file
+if [ ! -e "${WORLDCHROOT}" ] ; then downloadchroot ; fi
+
 isDirZFS "${JDIR}"
 if [ $? -eq 0 ] ; then
   # Create ZFS mount
@@ -105,9 +107,6 @@
    exit 0
 fi
 
-# Check if we need to download the chroot file
-if [ ! -e "${WORLDCHROOT}" ] ; then downloadchroot ; fi
-
 echo "Building new Jail... Please wait..."
 
 echo "Installing world..."



More information about the Commits mailing list