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

svn at pcbsd.org svn at pcbsd.org
Thu Feb 14 11:50:05 PST 2013


Author: kris
Date: 2013-02-14 19:50:05 +0000 (Thu, 14 Feb 2013)
New Revision: 21512

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

Also apply same dataset fix to when we remove a jail



Modified: pcbsd/current/src-sh/warden/scripts/backend/deletejail.sh
===================================================================
--- pcbsd/current/src-sh/warden/scripts/backend/deletejail.sh	2013-02-14 19:49:48 UTC (rev 21511)
+++ pcbsd/current/src-sh/warden/scripts/backend/deletejail.sh	2013-02-14 19:50:05 UTC (rev 21512)
@@ -50,9 +50,11 @@
 echo -e "Deleting Jail...\c"
 isDirZFS "${JDIR}/${IP}" "1"
 if [ $? -eq 0 ] ; then
-  # Create ZFS mount
-  tank=`getZFSTank "$JDIR"`
-  zfs destroy -r ${tank}${JDIR}/${IP}
+  zData=`getZFSDataset "${JDIR}/${IP}"`
+  if [ -z "$zData" ] ; then
+     exit_err "Failed getting ZFS dataset for ${JDIR}/${IP}..";
+  fi
+  zfs destroy -r ${zData}
   rmdir ${JDIR}/${IP} 2>/dev/null
 else
   chflags -R noschg "${JDIR}/${IP}"



More information about the Commits mailing list