From 354cbd329a57ea1b66633e89f5afe8c2ce0ecc6a Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Thu, 24 Apr 2025 11:04:44 -0600 Subject: [PATCH] template: Add comments about warning on empty ARG --- usr/local/share/bastille/template.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/usr/local/share/bastille/template.sh b/usr/local/share/bastille/template.sh index e9bf9c86..c3092f28 100644 --- a/usr/local/share/bastille/template.sh +++ b/usr/local/share/bastille/template.sh @@ -335,6 +335,9 @@ for _jail in ${JAILS}; do _arg_name=$(get_arg_name "${_line}") _arg_value=$(get_arg_value "${_line}" "$@") if [ -z "${_arg_value}" ]; then + # Just warn, not exit + # This is becasue some ARG values do not need to be set + # Example: Choosing DHCP for VNET jails does not set GATEWAY warn "[WARNING]: No value provided for arg: ${_arg_name}" fi ARG_REPLACEMENTS="${ARG_REPLACEMENTS} -e 's/\${${_arg_name}}/${_arg_value}/g'" @@ -420,6 +423,9 @@ for _jail in ${JAILS}; do # Override default command/args for some hooks. -- cwells case ${_hook} in CONFIG) + # Just warn, not exit + # This is becasue some ARG values do not need to be set + # Example: Choosing DHCP for VNET jails does not set GATEWAY warn "CONFIG deprecated; rename to OVERLAY." _args_template='${bastille_template}/${_line} /' _cmd='cp' ;;