mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
global-functions: add $DNSIsResolving
This commit is contained in:
parent
856c879fd8
commit
b7172b69ce
1 changed files with 11 additions and 0 deletions
|
@ -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 ];
|
||||
|
|
Loading…
Reference in a new issue