Permalink
Browse files

Display error if we fail to delete a jail template

  • Loading branch information...
1 parent e6d4539 commit 2567eba4f3888a8ac1348f0438f17986c992e48f @kmoore134 kmoore134 committed Jun 12, 2013
Showing with 4 additions and 1 deletion.
  1. +4 −1 src-sh/warden/scripts/backend/functions.sh
View
5 src-sh/warden/scripts/backend/functions.sh
@@ -1008,7 +1008,10 @@ delete_template()
if [ $? -ne 0 ] ; then printerror "Not a ZFS volume: ${tDir}" ; fi
tank=`getZFSTank "$tDir"`
rp=`getZFSRelativePath "$tDir"`
- zfs destroy -r $tank${rp}
+ zfs destroy -r $tank${rp}
+ if [ $? -ne 0 ] ; then
+ exit_err "Could not remove template, perhaps you have jails still using it?"
+ fi
rmdir ${tDir}
else
if [ ! -e "${tDir}.tbz" ] ; then

0 comments on commit 2567eba

Please sign in to comment.