From b8839ed6dfe90cb0c921277f7574315a116ca9cd Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 19 Jan 2026 15:22:02 +0100 Subject: [PATCH] ospf-to-leds: early exit with :exit --- ospf-to-leds.rsc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ospf-to-leds.rsc b/ospf-to-leds.rsc index 784fcdd8..8b3cb920 100644 --- a/ospf-to-leds.rsc +++ b/ospf-to-leds.rsc @@ -8,7 +8,6 @@ # visualize ospf instance state via leds # https://rsc.eworm.de/doc/ospf-to-leds.md -:local ExitOK false; :onerror Err { :global GlobalConfigReady; :global GlobalFunctionsReady; :retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \ @@ -20,8 +19,7 @@ :global ScriptLock; :if ([ $ScriptLock $ScriptName ] = false) do={ - :set ExitOK true; - :error false; + :exit; } :foreach Instance in=[ /routing/ospf/instance/find where comment~"^ospf-to-leds," ] do={ @@ -45,5 +43,5 @@ } } } do={ - :global ExitError; $ExitError $ExitOK [ :jobname ] $Err; + :global ExitError; $ExitError false [ :jobname ] $Err; }