diff --git a/usr/local/bin/bastille b/usr/local/bin/bastille index f2bafe35..62b97bb7 100755 --- a/usr/local/bin/bastille +++ b/usr/local/bin/bastille @@ -145,7 +145,14 @@ clone|cmd|console|convert|cp|edit|export|htop|limits|mount|pkg|rename|service|st shift if [ "${TARGET}" = 'ALL' ]; then - JAILS=$(jls name) + _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}$/")