mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-21 19:34:41 +02: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…
Add table
Add a link
Reference in a new issue