Skip to content

Commit

Permalink
further debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
schlichtanders committed Nov 25, 2024
1 parent faa3099 commit 1aeed33
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -849,11 +849,14 @@ cloudinit_write_files_common = <<EOT
# Current time + 300 seconds (5 minutes)
local END_SECONDS=$((SECONDS + 300))
while true; do
>&2 echo "loop"
if [[ "$SECONDS" > "$END_SECONDS" ]]; then
>&2 echo "timeout reached"
exit 1
fi
# run command and check return code
if $@ ; then
>&2 echo "break"
break
else
>&2 echo "got failure exit code, repeating"
Expand All @@ -864,7 +867,7 @@ cloudinit_write_files_common = <<EOT
myrename () {
local eth="$1"
local eth_connection=$(nmcli -g GENERAL.CONNECTION device show $eth)
local eth_connection=$(nmcli -g GENERAL.CONNECTION device show $eth || echo '')
nmcli connection modify "$eth_connection" \
con-name $eth \
connection.interface-name $eth
Expand Down

0 comments on commit 1aeed33

Please sign in to comment.