From fc894892bc57c89bbfd35277e15fe5d176b10980 Mon Sep 17 00:00:00 2001 From: kx1t <15090643+kx1t@users.noreply.github.com> Date: Mon, 17 Jun 2024 06:47:36 -0400 Subject: [PATCH] Fix 2 bugs - mlat-client user argument needs to be quoted to avoid splitting usernames with spaces - name_arg parameter needs to be unset between iterations of the loop --- rootfs/etc/s6-overlay/scripts/mlat-client | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rootfs/etc/s6-overlay/scripts/mlat-client b/rootfs/etc/s6-overlay/scripts/mlat-client index 09eb8ae..326314e 100755 --- a/rootfs/etc/s6-overlay/scripts/mlat-client +++ b/rootfs/etc/s6-overlay/scripts/mlat-client @@ -183,7 +183,7 @@ do # If the argument starts with "uuid=", then it must be a UUID, etc. # If the argument isn't any of the above, then it's an "extra argument" - unset uuid_arg lat_arg lon_arg alt_arg input_connect_arg return_port_arg extra_args + unset name_arg uuid_arg lat_arg lon_arg alt_arg input_connect_arg return_port_arg extra_args for ((i=2; i<${#params[*]}; i++)) do @@ -234,7 +234,7 @@ do MLAT_PARAM+=(--input-connect "${input_connect_arg:-localhost:30005}") if [[ -n "${name_arg}" ]] || [[ -n "${MLAT_USER}" ]]; then - MLAT_PARAM+=(--user "${name_arg:-${MLAT_USER}}") + MLAT_PARAM+=(--user \""${name_arg:-${MLAT_USER}}"\") else rnd="${RANDOM}" "${s6wrap[@]}" --args echo "WARNING: MLAT_USER is not set - using random number \"${rnd}\" as MLAT_USER"