mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-19 16:51:00 +01:00
set_target and error_continue functions
This commit is contained in:
@@ -56,6 +56,11 @@ error_notify() {
|
||||
echo -e "${COLOR_RED}$*${COLOR_RESET}" 1>&2
|
||||
}
|
||||
|
||||
error_continue() {
|
||||
error_notify "$@"
|
||||
continue
|
||||
}
|
||||
|
||||
# Notify message on error and exit
|
||||
error_exit() {
|
||||
error_notify "$@"
|
||||
@@ -118,6 +123,19 @@ EOF
|
||||
fi
|
||||
}
|
||||
|
||||
set_target() {
|
||||
local _TARGET="${1}"
|
||||
if [ "${_TARGET}" = ALL ] || [ "${_TARGET}" = all ]; then
|
||||
target_all_jails
|
||||
else
|
||||
check_target_exists "${_TARGET}" || exit
|
||||
JAILS="${_TARGET}"
|
||||
TARGET="${_TARGET}"
|
||||
export JAILS
|
||||
export TARGET
|
||||
fi
|
||||
}
|
||||
|
||||
checkyesno() {
|
||||
## copied from /etc/rc.subr -- cedwards (20231125)
|
||||
## issue #368 (lowercase values should be parsed)
|
||||
|
||||
Reference in New Issue
Block a user