diff --git a/bin/imds b/bin/imds index 1d0efe1..177c21a 100755 --- a/bin/imds +++ b/bin/imds @@ -121,7 +121,11 @@ _imds_has_route() { _imds() { local endpoint endpoints routed attempts=1 + if [ "$IMDS_ENDPOINT_WAIT_ATTEMPTS" -le 0 ]; then + endpoints="$(_imds_endpoints)" + fi while :; do + [ -n "$endpoints" ] && break endpoints= routed= for endpoint in $(_imds_endpoints); do