aboutsummaryrefslogtreecommitdiff
path: root/lib/10-core
diff options
context:
space:
mode:
authorCullum Smith <cullum@sacredheartsc.com>2024-07-12 15:20:54 -0400
committerCullum Smith <cullum@sacredheartsc.com>2024-07-12 15:20:54 -0400
commit241833b7f320e7fca84ba226f1ecbb0c963534f7 (patch)
treeee9839af8bee6ec9c5cac08306e3167634babcec /lib/10-core
parent8ec6df0afeb4ef69fa64de5516d16f4be48e0549 (diff)
downloadinfrastructure-241833b7f320e7fca84ba226f1ecbb0c963534f7.tar.gz
initial commit of hypervisor configs
Diffstat (limited to 'lib/10-core')
-rw-r--r--lib/10-core9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/10-core b/lib/10-core
index d7280d9..5fa2a16 100644
--- a/lib/10-core
+++ b/lib/10-core
@@ -98,7 +98,7 @@ _boxconf_include(){
elif [ -d "$1" ]; then
for _bci_file in "$1"/*; do
if [ -f "$_bci_file" ]; then
- log "sourcing ${1#${BOXCONF_ROOT}/}"
+ log "sourcing ${_bci_file#${BOXCONF_ROOT}/}"
BOXCONF_SOURCE=$_bci_file
. "$BOXCONF_SOURCE"
fi
@@ -141,8 +141,10 @@ _boxconf_stage(){
# Compex find expression to only copy files necessary for the target host.
# This avoids leaking site-wide secrets to hosts that don't require them.
- _bcs_relevant_files=$(find "${BOXCONF_ROOT}" -type f -and \( \
- -path "${BOXCONF_CA_DIR}/${_bcs_hostname}" \
+ set -f
+ _bcs_relevant_files=$(find -L "$BOXCONF_ROOT" -type f -and \( \
+ -path "${BOXCONF_CA_DIR}/ca.crt" \
+ -or -path "${BOXCONF_CA_DIR}/${_bcs_hostname}" \
-or -path "${BOXCONF_VAR_DIR}/common" \
-or -path "${BOXCONF_VAR_DIR}/common/*" \
-or -path "${BOXCONF_VAR_DIR}/os/*" \
@@ -194,6 +196,7 @@ _boxconf_stage(){
-or -path "${BOXCONF_SITE_FILE_DIR}/*.${BOXCONF_HOSTCLASS}" \
-or -path "${BOXCONF_SITE_FILE_DIR}/*.${_bcs_hostname}" \
\) )
+ set +f
OIFS=$IFS; IFS=$'\n'
set -- $_bcs_relevant_files