collect-wireless-mac: early exit with :exit

This commit is contained in:
Christian Hesse 2026-01-19 15:10:22 +01:00
parent 6810a60546
commit 83a485619a
5 changed files with 13 additions and 21 deletions

View file

@ -4,14 +4,13 @@
# https://rsc.eworm.de/COPYING.md
#
# provides: dhcpv4-server-lease, order=40
# requires RouterOS, version=7.19
# requires RouterOS, version=7.22
#
# collect wireless mac adresses in access list
# https://rsc.eworm.de/doc/collect-wireless-mac.md
#
# !! Do not edit this file, it is generated from template!
:local ExitOK false;
:onerror Err {
:global GlobalConfigReady; :global GlobalFunctionsReady;
:retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
@ -30,8 +29,7 @@
:global SymbolForNotification;
:if ([ $ScriptLock $ScriptName 10 ] = false) do={
:set ExitOK true;
:error false;
:exit;
}
:if ([ :len [ /interface/wireless/access-list/find where comment="--- collected above ---" disabled ] ] = 0) do={
@ -97,5 +95,5 @@
}
}
} do={
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
:global ExitOnError; $ExitOnError [ :jobname ] $Err;
}