From c8694ac703e989f239d6e16044c9ad20e061a5eb Mon Sep 17 00:00:00 2001
From: erdgeist <erdgeist@erdgeist.org>
Date: Wed, 10 Apr 2013 23:29:13 +0000
Subject: Do not attempt to chflags the root directory after it is gone, when
 wiping is requested on ezjail-admin delete. Thanks to Tom.

---
 ezjail-admin | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/ezjail-admin b/ezjail-admin
index a5f719a..3099826 100755
--- a/ezjail-admin
+++ b/ezjail-admin
@@ -838,8 +838,11 @@ delete)
     zfs)
       /sbin/zfs destroy -r ${ezjail_jailzfs}/${ezjail_hostname}
     ;;
+    *)
+      chflags -R noschg "${ezjail_rootdir}"
+    ;;
     esac
-    chflags -R noschg "${ezjail_rootdir}"; rm -rf "${ezjail_rootdir}"
+    rm -rf "${ezjail_rootdir}"
   fi
 
   ;;
-- 
cgit v1.2.3