collect-wireless-mac: use $ExitError to indicate unintentional error

This commit is contained in:
Christian Hesse 2024-12-06 10:31:51 +01:00
parent 9d17beef03
commit bf322781d1
4 changed files with 20 additions and 4 deletions

View file

@ -14,6 +14,7 @@
:global GlobalFunctionsReady; :global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } :while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false;
:do { :do {
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
@ -29,6 +30,7 @@
:global SymbolForNotification; :global SymbolForNotification;
:if ([ $ScriptLock $ScriptName 10 ] = false) do={ :if ([ $ScriptLock $ScriptName 10 ] = false) do={
:set ExitOK true;
:error false; :error false;
} }
@ -93,4 +95,6 @@
$LogPrint debug $ScriptName ("No mac address available... Ignoring."); $LogPrint debug $ScriptName ("No mac address available... Ignoring.");
} }
} }
} on-error={ } } on-error={
:global ExitError; $ExitError $ExitOK [ :jobname ];
}

View file

@ -14,6 +14,7 @@
:global GlobalFunctionsReady; :global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } :while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false;
:do { :do {
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
@ -29,6 +30,7 @@
:global SymbolForNotification; :global SymbolForNotification;
:if ([ $ScriptLock $ScriptName 10 ] = false) do={ :if ([ $ScriptLock $ScriptName 10 ] = false) do={
:set ExitOK true;
:error false; :error false;
} }
@ -94,4 +96,6 @@
$LogPrint debug $ScriptName ("No mac address available... Ignoring."); $LogPrint debug $ScriptName ("No mac address available... Ignoring.");
} }
} }
} on-error={ } } on-error={
:global ExitError; $ExitError $ExitOK [ :jobname ];
}

View file

@ -15,6 +15,7 @@
:global GlobalFunctionsReady; :global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } :while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false;
:do { :do {
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
@ -30,6 +31,7 @@
:global SymbolForNotification; :global SymbolForNotification;
:if ([ $ScriptLock $ScriptName 10 ] = false) do={ :if ([ $ScriptLock $ScriptName 10 ] = false) do={
:set ExitOK true;
:error false; :error false;
} }
@ -111,4 +113,6 @@
$LogPrint debug $ScriptName ("No mac address available... Ignoring."); $LogPrint debug $ScriptName ("No mac address available... Ignoring.");
} }
} }
} on-error={ } } on-error={
:global ExitError; $ExitError $ExitOK [ :jobname ];
}

View file

@ -14,6 +14,7 @@
:global GlobalFunctionsReady; :global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } :while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false;
:do { :do {
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
@ -29,6 +30,7 @@
:global SymbolForNotification; :global SymbolForNotification;
:if ([ $ScriptLock $ScriptName 10 ] = false) do={ :if ([ $ScriptLock $ScriptName 10 ] = false) do={
:set ExitOK true;
:error false; :error false;
} }
@ -93,4 +95,6 @@
$LogPrint debug $ScriptName ("No mac address available... Ignoring."); $LogPrint debug $ScriptName ("No mac address available... Ignoring.");
} }
} }
} on-error={ } } on-error={
:global ExitError; $ExitError $ExitOK [ :jobname ];
}