From 6ef1b2d4e0c542a24c7098bd5fe3466dc0c32b9b Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Mon, 3 Mar 2025 15:57:29 -0700 Subject: [PATCH] template: Add HOSTCMD to hooks --- usr/local/share/bastille/template.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/usr/local/share/bastille/template.sh b/usr/local/share/bastille/template.sh index eec08752..2ce60506 100644 --- a/usr/local/share/bastille/template.sh +++ b/usr/local/share/bastille/template.sh @@ -154,7 +154,7 @@ TARGET="${1}" TEMPLATE="${2}" bastille_template=${bastille_templatesdir}/${TEMPLATE} if [ -z "${HOOKS}" ]; then - HOOKS='LIMITS INCLUDE PRE FSTAB PF PKG OVERLAY CONFIG SYSRC SERVICE CMD RENDER' + HOOKS='LIMITS INCLUDE PRE FSTAB PF PKG OVERLAY CONFIG SYSRC SERVICE CMD RENDER HOSTCMD' fi bastille_root_check @@ -369,6 +369,9 @@ for _jail in ${JAILS}; do ;; fstab|mount) _cmd='mount' ;; + # Execute this command on the host + hostcmd) + eval "${_args}" ;; include) _cmd='template' ;; overlay)