mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-20 17:20:12 +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
|
echo -e "${COLOR_RED}$*${COLOR_RESET}" 1>&2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
error_continue() {
|
||||||
|
error_notify "$@"
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
# Notify message on error and exit
|
# Notify message on error and exit
|
||||||
error_exit() {
|
error_exit() {
|
||||||
error_notify "$@"
|
error_notify "$@"
|
||||||
@@ -118,6 +123,19 @@ EOF
|
|||||||
fi
|
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() {
|
checkyesno() {
|
||||||
## copied from /etc/rc.subr -- cedwards (20231125)
|
## copied from /etc/rc.subr -- cedwards (20231125)
|
||||||
## issue #368 (lowercase values should be parsed)
|
## issue #368 (lowercase values should be parsed)
|
||||||
|
|||||||
Reference in New Issue
Block a user