Merge pull request #887 from BastilleBSD/jail-import-iocage-ezjail

import: Import jails using new interface format (iocage,ezjail)
This commit is contained in:
Barry McCormick
2025-03-03 08:26:25 -08:00
committed by GitHub
3 changed files with 193 additions and 103 deletions

View File

@@ -554,10 +554,12 @@ create_jail() {
fi
fi
# Exit if jail was not started, which means something is wrong.
if ! check_target_is_running "${NAME}"; then
bastille destroy "${NAME}"
error_exit "[${NAME}]: Failed to create jail..."
# Exit if jail was not started, except for empty jails
if [ -z "${EMPTY_JAIL}" ]; then
if ! check_target_is_running "${NAME}"; then
bastille destroy "${NAME}"
error_exit "[${NAME}]: Failed to create jail..."
fi
fi
if [ -n "${VNET_JAIL}" ]; then