From cab0c0e9096cd43f638f1b763684b1bca84fafa5 Mon Sep 17 00:00:00 2001 From: Heds Simons Date: Thu, 14 Mar 2019 15:28:57 +0000 Subject: [PATCH] WIP: hostname-vars: Ensure previous hostname envvars aren't overwritten Connects-to: #78 Change-type: patch Signed-off-by: Heds Simons --- src/configure-balena-host-envvars.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/configure-balena-host-envvars.sh b/src/configure-balena-host-envvars.sh index d3b000e4..b81c24e4 100755 --- a/src/configure-balena-host-envvars.sh +++ b/src/configure-balena-host-envvars.sh @@ -36,10 +36,9 @@ HOST_ENVVARS[BALENA_SENTRY_URL_HOST]=sentry HOST_ENVVARS[BALENA_MONITOR_HOST]=monitor # Go through the lists and fill in any missing envvars -#for index in $(seq 1 ${#HOST_ENVVARS[*]}); do for VARNAME in "${!HOST_ENVVARS[@]}"; do - VARVALUE="${HOST_ENVVARS[$VARNAME]}" - if [[ ! -z "$VARVALUE" ]]; then + VARVALUE=${!VARNAME} + if [[ -z "$VARVALUE" ]]; then # Only use BALENA_DEVICE_UUID if it actually exists, else just use the # full passed in TLD DEVICE=""