mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-25 23:10:33 +01:00
Update destroy.sh - allow for jail root to be mounted when destroying
This will allow the jail root to be mounted when destroying a jail, but if anything under 'root' is still mounted, it will exit.
This commit is contained in:
@@ -55,7 +55,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}")
|
||||
mount_points=$(mount | cut -d ' ' -f 3 | grep "${bastille_jail_base}"/root/)
|
||||
if [ $? -eq 0 ]; then
|
||||
error_notify "Failed to destroy jail: ${TARGET}"
|
||||
error_exit "Jail has mounted filesystems:\n$mount_points"
|
||||
|
||||
Reference in New Issue
Block a user