build/rsyncd: replace newlines with spaces when generating ALLOW_HOST list

This commit is contained in:
James Munnelly 2024-03-14 11:10:28 +00:00
parent 881cc5bc96
commit 1c88cd6167

View File

@ -611,7 +611,7 @@ function kube::build::start_rsyncd_container() {
V=3 kube::log::status "Starting rsyncd container"
kube::build::run_build_command_ex \
"${KUBE_RSYNC_CONTAINER_NAME}" -p 127.0.0.1:"${KUBE_RSYNC_PORT}":"${KUBE_CONTAINER_RSYNC_PORT}" -d \
-e ALLOW_HOST="$(${IPTOOL} | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1')" \
-e ALLOW_HOST="$(${IPTOOL} | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1' | tr '\n' ' ')" \
-- /rsyncd.sh >/dev/null
local mapped_port