From 494d963619ab02847c38d0f34c033e6dfdf3dc45 Mon Sep 17 00:00:00 2001 From: wiedehopf Date: Wed, 9 Oct 2024 12:50:22 +0200 Subject: [PATCH] remove spaces from MLAT_USER (#150) the readme already says not to put spaces but like this mlat will work even with spaces instead of producing errors --- rootfs/etc/s6-overlay/scripts/mlat-client | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rootfs/etc/s6-overlay/scripts/mlat-client b/rootfs/etc/s6-overlay/scripts/mlat-client index 47a05a0..a2592d3 100755 --- a/rootfs/etc/s6-overlay/scripts/mlat-client +++ b/rootfs/etc/s6-overlay/scripts/mlat-client @@ -239,7 +239,10 @@ 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}}"\") + # remove spaces from mlat name to avoid startup errors + # the readme already says not to put spaces but like this mlat will work even with space + name=$( sed -e 's/ /_/g' <<< "${name_arg:-${MLAT_USER}}") + MLAT_PARAM+=(--user "${name}") else rnd="${RANDOM}" "${s6wrap[@]}" --args echo "WARNING: MLAT_USER is not set - using random number \"${rnd}\" as MLAT_USER"