From 5b3c839fb9e073989d44aa9e0d47bf70197101db Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Sat, 3 May 2025 19:16:19 -0600 Subject: [PATCH] bastille: Bugfix for listing parallel jails in reverse --- usr/local/bin/bastille | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/usr/local/bin/bastille b/usr/local/bin/bastille index 99671e27..e962d513 100755 --- a/usr/local/bin/bastille +++ b/usr/local/bin/bastille @@ -32,7 +32,7 @@ PATH=${PATH}:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin -BASTILLE_VERSION="0.14.20250420" +BASTILLE_VERSION=aec0630 ## check for config existence bastille_conf_check() { @@ -253,14 +253,28 @@ case "${CMD}" in shift 1 ;; *) - if ! set_target "${1}" >/dev/null 2>&1; then - OPTIONS="${OPTIONS} ${1}" - shift 1 - else - XARGS_JAILS="${JAILS}" - shift 1 - break - fi + case "${CMD}" in + stop|destroy) + if ! set_target "${1}" "reverse" >/dev/null 2>&1; then + OPTIONS="${OPTIONS} ${1}" + shift 1 + else + XARGS_JAILS="${JAILS}" + shift 1 + break + fi + ;; + *) + if ! set_target "${1}" >/dev/null 2>&1; then + OPTIONS="${OPTIONS} ${1}" + shift 1 + else + XARGS_JAILS="${JAILS}" + shift 1 + break + fi + ;; + esac esac done ;; @@ -286,7 +300,5 @@ if [ -f "${SCRIPTPATH}" ]; then fi else - - error_exit "${SCRIPTPATH} not found." - + error_exit "${SCRIPTPATH} not found." fi