check-routeros-update: fail if global functions do not become ready

This commit is contained in:
Christian Hesse 2025-05-06 10:46:44 +02:00
parent 08d78224a0
commit 69b2af4bd7

View file

@ -9,11 +9,11 @@
# check for RouterOS update, send notification and/or install
# https://rsc.eworm.de/doc/check-routeros-update.md
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false;
:onerror Err {
:global GlobalFunctionsReady;
:retry { :if ($GlobalFunctionsReady != true) \
do={ :error ("Global functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ];
:global Identity;