Merge pull request #1188 from BastilleBSD/fix-cmd

parallel mode: Remove cmd and service
This commit is contained in:
tschettervictor
2025-07-12 21:31:13 -06:00
committed by GitHub
6 changed files with 8 additions and 59 deletions

View File

@@ -203,9 +203,11 @@ case "${CMD}" in
# Commands that don't allow parallel mode
bootstrap| \
clone| \
cmd| \
console| \
convert| \
create| \
destroy| \
edit| \
etcupdate| \
export| \
@@ -213,10 +215,13 @@ case "${CMD}" in
import| \
limits| \
list| \
migrate| \
network| \
pkg| \
rcp| \
rdr| \
rename| \
service| \
setup| \
top| \
update| \
@@ -227,17 +232,12 @@ case "${CMD}" in
fi
;;
# Commands that allow parallel mode
cmd| \
config| \
cp| \
destroy| \
jcp| \
limits| \
migrate| \
mount| \
pkg| \
restart| \
service| \
start| \
stop| \
sysrc| \

View File

@@ -93,8 +93,6 @@ set_target "${TARGET}"
for _jail in ${JAILS}; do
(
# Validate jail state
check_target_is_running "${_jail}" || if [ "${AUTO}" -eq 1 ]; then
bastille start "${_jail}"
@@ -114,12 +112,7 @@ for _jail in ${JAILS}; do
fi
bastille_check_exit_code "${_jail}" "$?"
) &
bastille_running_jobs "${bastille_process_limit}"
done
wait
bastille_return_exit_code

View File

@@ -334,17 +334,7 @@ case "${TARGET}" in
# Destroy targeted jail(s)
set_target "${TARGET}" "reverse"
for _jail in ${JAILS}; do
if [ "${AUTO_YES}" -eq 1 ]; then
(
destroy_jail "${_jail}"
) &
else
(
destroy_jail "${_jail}"
)
fi
bastille_running_jobs "${bastille_process_limit}"
destroy_jail "${_jail}"
done
wait
;;
esac

View File

@@ -348,8 +348,6 @@ validate_host_status "${USER}" "${HOST}" "${PORT}"
for _jail in ${JAILS}; do
(
# Validate jail state
if [ "${LIVE}" -eq 1 ]; then
if ! check_target_is_running "${_jail}"; then
@@ -371,9 +369,5 @@ for _jail in ${JAILS}; do
info "\nSuccessfully migrated '${_jail}' to '${HOST}'.\n"
) &
bastille_running_jobs "${bastille_process_limit}"
done
wait
echo

View File

@@ -140,29 +140,8 @@ pkg_run_command() {
}
for _jail in ${JAILS}; do
if [ "${AUTO_YES}" -eq 1 ]; then
(
pkg_run_command "$@"
) &
else
(
pkg_run_command "$@"
)
fi
bastille_running_jobs "${bastille_process_limit}"
pkg_run_command "$@"
done
wait
echo
bastille_return_exit_code

View File

@@ -91,8 +91,6 @@ set_target "${TARGET}"
for _jail in ${JAILS}; do
(
# Validate jail state
check_target_is_running "${_jail}" || if [ "${AUTO}" -eq 1 ]; then
bastille start "${_jail}"
@@ -108,12 +106,7 @@ for _jail in ${JAILS}; do
bastille_check_exit_code "${_jail}" "$?"
) &
bastille_running_jobs "${bastille_process_limit}"
done
wait
echo
bastille_return_exit_code