mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-24 19:22:26 +01:00
Merge pull request #261 from cbaecker/non-bastille_vs_ALL
Prevent acting on non-bastille jails when using target ALL
This commit is contained in:
@@ -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}$/")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user