From 589e7995bfc6b6154fe5d4b6da4e57848a9a0eba Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 5 May 2025 18:01:28 +0200 Subject: [PATCH] firmware-upgrade-reboot: fail if global functions do not become ready Co-authored-by: Ilya Kulakov --- firmware-upgrade-reboot.rsc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/firmware-upgrade-reboot.rsc b/firmware-upgrade-reboot.rsc index 86a9a8c5..17a6dd36 100644 --- a/firmware-upgrade-reboot.rsc +++ b/firmware-upgrade-reboot.rsc @@ -9,7 +9,8 @@ # https://rsc.eworm.de/doc/firmware-upgrade-reboot.md :global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } +:onerror e { :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error "Global functions not ready."; }; } delay=500ms max=20; } do={ :log error $e; }; :local ExitOK false; :do {