From a2e7f3e426400448db5f334bc48d431db8d2e47f Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Thu, 6 Mar 2025 18:20:58 -0700 Subject: [PATCH] Revert "template: Add HOSTCMD to hooks" --- docs/chapters/template.rst | 4 ---- usr/local/share/bastille/template.sh | 7 +------ 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/docs/chapters/template.rst b/docs/chapters/template.rst index e7e2f95e..a2a317cf 100644 --- a/docs/chapters/template.rst +++ b/docs/chapters/template.rst @@ -33,8 +33,6 @@ Template Automation Hooks +-------------+---------------------+-----------------------------------------+ | CP/OVERLAY | path(s) | etc root usr (one per line) | +-------------+---------------------+-----------------------------------------+ -| HOSTCMD | command | pkg info | -+-------------+---------------------+-----------------------------------------+ | INCLUDE | template path/URL | http?://TEMPLATE_URL or project/path | +-------------+---------------------+-----------------------------------------+ | LIMITS | resource value | memoryuse 1G | @@ -76,8 +74,6 @@ CONFIG - set the specified property and value CP/OVERLAY - copy specified files from template directory to specified path inside jail -HOSTCMD - run the specified command on the host instead of the jail - INCLUDE - specify a template to include. Make sure the template is bootstrapped, or you are using the template url LIMITS - set the specified resource value for the jail diff --git a/usr/local/share/bastille/template.sh b/usr/local/share/bastille/template.sh index 41e37b53..eec08752 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 HOSTCMD' + HOOKS='LIMITS INCLUDE PRE FSTAB PF PKG OVERLAY CONFIG SYSRC SERVICE CMD RENDER' fi bastille_root_check @@ -369,11 +369,6 @@ for _jail in ${JAILS}; do ;; fstab|mount) _cmd='mount' ;; - # Execute this command on the host - hostcmd) - eval "${_args}" - continue - ;; include) _cmd='template' ;; overlay)