Skip to content

Commit

Permalink
remove spaces from MLAT_USER (#150)
Browse files Browse the repository at this point in the history
the readme already says not to put spaces but like this mlat will work
even with spaces instead of producing errors
  • Loading branch information
wiedehopf authored Oct 9, 2024
1 parent 1c47b76 commit 494d963
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rootfs/etc/s6-overlay/scripts/mlat-client
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 494d963

Please sign in to comment.