From ba2ff8ef75f6441934f4af36a9ae3ea68896727c Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Tue, 31 Dec 2024 10:33:59 -0700 Subject: [PATCH] better error handling --- usr/local/share/bastille/destroy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/local/share/bastille/destroy.sh b/usr/local/share/bastille/destroy.sh index 0ba7e3f3..d95a4429 100644 --- a/usr/local/share/bastille/destroy.sh +++ b/usr/local/share/bastille/destroy.sh @@ -56,7 +56,7 @@ destroy_jail() { if [ -d "${bastille_jail_base}" ]; then ## make sure no filesystem is currently mounted in the jail directory mount_points=$(mount | cut -d ' ' -f 3 | grep "${bastille_jail_base}"/root/) - if [ $? -eq 0 ]; then + if [ -n "${mount_points}" ]; then error_notify "Failed to destroy jail: ${TARGET}" error_exit "Jail has mounted filesystems:\n$mount_points" fi