This commit is contained in:
tschettervictor
2024-12-16 16:58:41 -07:00
committed by GitHub
parent 6d2e9c2ec9
commit 1fce1925a6

View File

@@ -87,20 +87,20 @@ check_target_exists() {
check_target_is_running() { check_target_is_running() {
TARGET="${1}" TARGET="${1}"
if [ ! "$(/usr/sbin/jls name | awk "/^${TARGET}$/")" ]; then if [ ! "$(/usr/sbin/jls name | awk "/^${TARGET}$/")" ]; then
error_exit "[${TARGET}]: Not started. See 'bastille start ${TARGET}'." error_exit "[${TARGET}]: Not started. See 'bastille start ${TARGET}'."
fi fi
} }
target_all_jails() { target_all_jails() {
_JAILS=$(/usr/sbin/jls name) _JAILS=$(/usr/sbin/jls name)
JAILS="" JAILS=""
for _jail in ${_JAILS}; do for _jail in ${_JAILS}; do
_JAILPATH=$(/usr/sbin/jls -j "${_jail}" path) _JAILPATH=$(/usr/sbin/jls -j "${_jail}" path)
if [ -z ${_JAILPATH##${bastille_jailsdir}*} ]; then if [ -z ${_JAILPATH##${bastille_jailsdir}*} ]; then
JAILS="${JAILS} ${_jail}" JAILS="${JAILS} ${_jail}"
fi fi
done done
} }
generate_vnet_jail_netblock() { generate_vnet_jail_netblock() {