From d458ed8ee16b768a323eab96c554d24d141c60ca Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Fri, 20 Dec 2024 22:39:53 -0700 Subject: [PATCH] Update common.sh --- usr/local/share/bastille/common.sh | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/usr/local/share/bastille/common.sh b/usr/local/share/bastille/common.sh index ebe66325..f6eaedb0 100644 --- a/usr/local/share/bastille/common.sh +++ b/usr/local/share/bastille/common.sh @@ -173,20 +173,12 @@ EOF fi } -set_target() { - if [ "${1}" = ALL ] || [ "${1}" = all ]; then - target_all_jails - else - TARGET="${1}" - fi -} - set_target() { local _TARGET="${1}" if [ "${_TARGET}" = ALL ] || [ "${_TARGET}" = all ]; then target_all_jails else - check_target_exists "${_TARGET}" + check_target_exists "${_TARGET}" || exit JAILS="${_TARGET}" TARGET="${_TARGET}" export JAILS @@ -197,10 +189,9 @@ set_target() { set_target_single() { local _TARGET="${1}" if [ "${_TARGET}" = ALL ] || [ "${_TARGET}" = all ]; then - error_notify "[all|ALL] not supported with this command." - return 1 + error_exit "[all|ALL] not supported with this command." else - check_target_exists "${_TARGET}" + check_target_exists "${_TARGET}" || exit JAILS="${_TARGET}" TARGET="${_TARGET}" export JAILS