Skip to content

Commit

Permalink
Sets a placeholder value for dnsServers when none is provided.
Browse files Browse the repository at this point in the history
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 <carloc@balena.io>
  • Loading branch information
cmfcruz committed Aug 15, 2023
1 parent 69de20e commit e7a09f1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions resources/resincli.robot
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit e7a09f1

Please sign in to comment.