diff options
author | Christian Hesse <mail@eworm.de> | 2020-05-26 23:34:58 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2020-05-26 23:34:58 +0200 |
commit | 4166bf91c348a261563087e14cb839e2695b991f (patch) | |
tree | cc74370f48e294c7193025f91fb3753dec31792a | |
parent | b7172b69cee46cf9e001918333855e9b79aa15e0 (diff) |
global-functions: add $WaitDNSResolving
-rw-r--r-- | global-functions | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/global-functions b/global-functions index d7ee6b8..21e89af 100644 --- a/global-functions +++ b/global-functions @@ -42,6 +42,7 @@ :global TimeIsSync; :global UrlEncode; :global WaitDefaultRouteReachable; +:global WaitDNSResolving; :global WaitForFile; :global WaitTimeSync; @@ -722,6 +723,15 @@ } } +# wait for DNS to resolve +:set WaitDNSResolving do={ + :global DNSIsResolving; + + :while ([ $DNSIsResolving ] = false) do={ + :delay 1s; + } +} + # wait for file to be available :set WaitForFile do={ :global CleanFilePath; |