summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xezjail-admin9
1 files changed, 8 insertions, 1 deletions
diff --git a/ezjail-admin b/ezjail-admin
index fb3fc1f..d18bb79 100755
--- a/ezjail-admin
+++ b/ezjail-admin
@@ -923,7 +923,14 @@ delete)
923 [ "${ezjail_image}" ] && rm -f "${ezjail_image}" "${ezjail_image%.img}.device" 923 [ "${ezjail_image}" ] && rm -f "${ezjail_image}" "${ezjail_image%.img}.device"
924 ;; 924 ;;
925 zfs) 925 zfs)
926 /sbin/zfs destroy -r ${ezjail_parentzfs}/${ezjail_hostname} 926 if ! /sbin/zfs destroy -r ${ezjail_parentzfs}/${ezjail_hostname}; then
927 [ "${ezjail_forcestop}" ] || exerr "Error: Could not destroy file system ${ezjail_parentzfs}/${ezjail_hostname} for jail ${ezjail_name}."
928 echo "Warning: Could not destroy file system ${ezjail_parentzfs}/${ezjail_hostname} for jail ${ezjail_name}."
929 echo " Sleeping 5 seconds before retrying forcefully."
930 sleep 5
931 /sbin/zfs destroy -rf ${ezjail_parentzfs}/${ezjail_hostname} || exerr "Error: Failed to destroy file system."
932 echo "Success."
933 fi
927 ;; 934 ;;
928 *) 935 *)
929 chflags -R noschg "${ezjail_rootdir}" 936 chflags -R noschg "${ezjail_rootdir}"