mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
global-functions: rename internal function: $DefaultRouteIsReachable -> $IsDefaultRouteReachable
This commit is contained in:
parent
f628ef73fd
commit
0ee38a4303
1 changed files with 11 additions and 11 deletions
|
@ -22,7 +22,6 @@
|
|||
:global CertificateNameByCN;
|
||||
:global CharacterReplace;
|
||||
:global CleanFilePath;
|
||||
:global DefaultRouteIsReachable;
|
||||
:global DeviceInfo;
|
||||
:global DNSIsResolving;
|
||||
:global DownloadPackage;
|
||||
|
@ -34,6 +33,7 @@
|
|||
:global GetRandomNumber;
|
||||
:global HexToNum;
|
||||
:global IfThenElse;
|
||||
:global IsDefaultRouteReachable;
|
||||
:global LogPrintExit2;
|
||||
:global MkDir;
|
||||
:global NotificationFunctions;
|
||||
|
@ -183,14 +183,6 @@
|
|||
:return $Path;
|
||||
}
|
||||
|
||||
# default route is reachable
|
||||
:set DefaultRouteIsReachable do={
|
||||
:if ([ :len [ /ip/route/find where dst-address=0.0.0.0/0 active routing-table=main ] ] > 0) do={
|
||||
:return true;
|
||||
}
|
||||
:return false;
|
||||
}
|
||||
|
||||
# get readable device info
|
||||
:set DeviceInfo do={
|
||||
:global ExpectedConfigVersion;
|
||||
|
@ -462,6 +454,14 @@
|
|||
:return $3;
|
||||
}
|
||||
|
||||
# check if default route is reachable
|
||||
:set IsDefaultRouteReachable do={
|
||||
:if ([ :len [ /ip/route/find where dst-address=0.0.0.0/0 active routing-table=main ] ] > 0) do={
|
||||
:return true;
|
||||
}
|
||||
:return false;
|
||||
}
|
||||
|
||||
# log and print with same text, optionally exit
|
||||
:set LogPrintExit2 do={
|
||||
:local Severity [ :tostr $1 ];
|
||||
|
@ -1208,9 +1208,9 @@
|
|||
|
||||
# wait for default route to be reachable
|
||||
:set WaitDefaultRouteReachable do={
|
||||
:global DefaultRouteIsReachable;
|
||||
:global IsDefaultRouteReachable;
|
||||
|
||||
:while ([ $DefaultRouteIsReachable ] = false) do={
|
||||
:while ([ $IsDefaultRouteReachable ] = false) do={
|
||||
:delay 1s;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue