mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-08-14 06:58:50 +02:00
lease-script: fail if global functions do not become ready
This commit is contained in:
parent
41b705aa5a
commit
829fce789b
1 changed files with 3 additions and 3 deletions
|
@ -8,11 +8,11 @@
|
||||||
# run scripts on DHCP lease
|
# run scripts on DHCP lease
|
||||||
# https://rsc.eworm.de/doc/lease-script.md
|
# https://rsc.eworm.de/doc/lease-script.md
|
||||||
|
|
||||||
:global GlobalFunctionsReady;
|
|
||||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
|
||||||
|
|
||||||
:local ExitOK false;
|
:local ExitOK false;
|
||||||
:onerror Err {
|
:onerror Err {
|
||||||
|
:global GlobalFunctionsReady;
|
||||||
|
:retry { :if ($GlobalFunctionsReady != true) \
|
||||||
|
do={ :error ("Global functions not ready."); }; } delay=500ms max=50;
|
||||||
:local ScriptName [ :jobname ];
|
:local ScriptName [ :jobname ];
|
||||||
|
|
||||||
:global Grep;
|
:global Grep;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue