Merge branch 'master' into patch-4

This commit is contained in:
tschettervictor
2025-01-26 18:18:11 -07:00
committed by GitHub
5 changed files with 93 additions and 35 deletions

View File

@@ -138,7 +138,7 @@ EOF
CMD=$1
shift
target_all_jails() {
target_all_jails_old() {
_JAILS=$(/usr/sbin/jls name)
JAILS=""
for _jail in ${_JAILS}; do
@@ -149,7 +149,7 @@ target_all_jails() {
done
}
check_target_is_running() {
check_target_is_running_old() {
if [ ! "$(/usr/sbin/jls name | awk "/^${TARGET}$/")" ]; then
error_exit "[${TARGET}]: Not started. See 'bastille start ${TARGET}'."
fi
@@ -164,10 +164,10 @@ version|-v|--version)
help|-h|--help)
usage
;;
bootstrap|clone|create|destroy|etcupdate|export|htop|import|list|mount|pkg|rdr|rename|restart|setup|start|top|umount|update|upgrade|verify)
bootstrap|clone|console|create|cp|destroy|etcupdate|export|htop|import|jcp|list|mount|pkg|rcp|rdr|rename|restart|setup|start|top|umount|update|upgrade|verify)
# Nothing "extra" to do for these commands. -- cwells
;;
config|cmd|console|convert|cp|edit|limits|rcp|service|stop|sysrc|tags|template|zfs)
config|cmd|convert|edit|limits|service|stop|sysrc|tags|template|zfs)
# Parse the target and ensure it exists. -- cwells
if [ $# -eq 0 ]; then # No target was given, so show the command's help. -- cwells
PARAMS='help'
@@ -188,15 +188,15 @@ config|cmd|console|convert|cp|edit|limits|rcp|service|stop|sysrc|tags|template|z
fi
if [ "${TARGET}" = 'ALL' ]; then
target_all_jails
target_all_jails_old
elif [ "${CMD}" = "pkg" ] && [ "${TARGET}" = '-H' ] || [ "${TARGET}" = '--host' ]; then
TARGET="${1}"
USE_HOST_PKG=1
if [ "${TARGET}" = 'ALL' ]; then
target_all_jails
target_all_jails_old
else
JAILS="${TARGET}"
check_target_is_running
check_target_is_running_old
fi
shift
elif [ "${CMD}" = 'template' ] && [ "${TARGET}" = '--convert' ]; then
@@ -212,8 +212,8 @@ config|cmd|console|convert|cp|edit|limits|rcp|service|stop|sysrc|tags|template|z
fi
case "${CMD}" in
cmd|console|pkg|service|stop|sysrc|template)
check_target_is_running
cmd|pkg|service|stop|sysrc|template)
check_target_is_running_old
;;
convert|rename)
# Require the target to be stopped. -- cwells