mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55:19 +00:00
global-functions: add $DefaultRouteIsReachable
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user