From e7a09f17d1ed0520cfd365f7c1cffba6d83fc841 Mon Sep 17 00:00:00 2001 From: "Carlo Miguel F. Cruz" Date: Thu, 10 Aug 2023 10:03:06 +0800 Subject: [PATCH] Sets a placeholder value for dnsServers when none is provided. The image will not be configured with a custom DNS server if the variable is found to contain the placeholder value. Change-type: patch Signed-off-by: Carlo Miguel F. Cruz --- resources/resincli.robot | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/resincli.robot b/resources/resincli.robot index 5116108..7f6ece6 100644 --- a/resources/resincli.robot +++ b/resources/resincli.robot @@ -67,9 +67,9 @@ Configure "${image}" version "${os_version}" with "${application_name}" Process ${result_register} ${result} = Run Process balena os configure ${image} --device ${result_register.stdout} --version ${os_version} --config-network ethernet --dev shell=yes Process ${result} - ${DNS_SERVER} = Get Environment Variable DNS_SERVER default=True - ${result_dns} = Run Keyword If '${DNS_SERVER}' != '' Run Process balena config write --drive "${image}" dnsServers "${DNS_SERVER}" shell=yes - Process ${result_dns} + ${dns_server} = Get Environment Variable DNS_SERVER default=empty + ${dns_config} = Run Keyword If '${dns_server}' != 'empty' Run Process balena config write --drive "${image}" dnsServers "${dns_server}" shell=yes + Run Keyword If '${dns_server}' != 'empty' Process ${dns_config} Return From Keyword ${result_register.stdout} Get "${device_info}" of device "${device_uuid}"