mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
global-functions: add $DefaultRouteIsReachable
This commit is contained in:
parent
d6ce774fd8
commit
999763a263
1 changed files with 9 additions and 0 deletions
|
@ -22,6 +22,7 @@
|
|||
:global CertificateNameByCN;
|
||||
:global CharacterReplace;
|
||||
:global CleanFilePath;
|
||||
:global DefaultRouteIsReachable;
|
||||
:global DeviceInfo;
|
||||
:global DownloadPackage;
|
||||
:global GetMacVendor;
|
||||
|
@ -164,6 +165,14 @@
|
|||
:return $Path;
|
||||
}
|
||||
|
||||
# default route is reachable
|
||||
:set DefaultRouteIsReachable do={
|
||||
:if ([ / ip route print count-only where dst-address=0.0.0.0/0 !unreachable active !routing-mark ] > 0) do={
|
||||
:return true;
|
||||
}
|
||||
:return false;
|
||||
}
|
||||
|
||||
# get readable device info
|
||||
:set DeviceInfo do={
|
||||
:global ExpectedConfigVersion;
|
||||
|
|
Loading…
Reference in a new issue