global-functions: add $DNSIsResolving

This commit is contained in:
Christian Hesse 2020-05-26 23:33:49 +02:00
parent 856c879fd8
commit b7172b69ce

View file

@ -24,6 +24,7 @@
:global CleanFilePath;
:global DefaultRouteIsReachable;
:global DeviceInfo;
:global DNSIsResolving;
:global DownloadPackage;
:global GetMacVendor;
:global GetRandom;
@ -218,6 +219,16 @@
:return $Info;
}
# check if DNS is resolving
:set DNSIsResolving do={
:do {
:resolve mikrotik.com;
:return true;
} on-error={
:return false;
}
}
# download package from upgrade server
:set DownloadPackage do={
:local PkgName [ :tostr $1 ];