mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-23 10:40:43 +01:00
better error handling
This commit is contained in:
@@ -56,7 +56,7 @@ destroy_jail() {
|
|||||||
if [ -d "${bastille_jail_base}" ]; then
|
if [ -d "${bastille_jail_base}" ]; then
|
||||||
## make sure no filesystem is currently mounted in the jail directory
|
## make sure no filesystem is currently mounted in the jail directory
|
||||||
mount_points=$(mount | cut -d ' ' -f 3 | grep "${bastille_jail_base}"/root/)
|
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_notify "Failed to destroy jail: ${TARGET}"
|
||||||
error_exit "Jail has mounted filesystems:\n$mount_points"
|
error_exit "Jail has mounted filesystems:\n$mount_points"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user