Restrict to running jails

This commit is contained in:
Carsten BÃcker
2020-09-30 10:36:58 +00:00
parent 8725e9ccac
commit 9fd83714c8

View File

@@ -145,7 +145,15 @@ clone|cmd|console|convert|cp|edit|export|htop|limits|mount|pkg|rename|service|st
shift
if [ "${TARGET}" = 'ALL' ]; then
JAILS=$(ls ${bastille_jailsdir})
_JAILS=$(jls name)
JAILS=""
for _jail in ${_JAILS}; do
_JAILPATH=$(jls -j "${_jail}" path)
if [ -z ${_JAILPATH##${bastille_jailsdir}*} ]; then
JAILS="${JAILS} ${_jail}"
fi
done
else
JAILS=$(jls name | awk "/^${TARGET}$/")