aboutsummaryrefslogtreecommitdiffstats
path: root/accesslist-duplicates.template.rsc
diff options
context:
space:
mode:
Diffstat (limited to 'accesslist-duplicates.template.rsc')
-rw-r--r--accesslist-duplicates.template.rsc21
1 files changed, 12 insertions, 9 deletions
diff --git a/accesslist-duplicates.template.rsc b/accesslist-duplicates.template.rsc
index b8067c8..e51198d 100644
--- a/accesslist-duplicates.template.rsc
+++ b/accesslist-duplicates.template.rsc
@@ -1,20 +1,21 @@
#!rsc by RouterOS
# RouterOS script: accesslist-duplicates%TEMPL%
-# Copyright (c) 2018-2024 Christian Hesse <mail@eworm.de>
-# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
+# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de>
+# https://rsc.eworm.de/COPYING.md
#
-# requires RouterOS, version=7.13
+# requires RouterOS, version=7.15
#
# print duplicate antries in wireless access list
-# https://git.eworm.de/cgit/routeros-scripts/about/doc/accesslist-duplicates.md
+# https://rsc.eworm.de/doc/accesslist-duplicates.md
#
# !! This is just a template to generate the real script!
# !! Pattern '%TEMPL%' is replaced, paths are filtered.
-:global GlobalFunctionsReady;
-:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
-
-:do {
+:local ExitOK false;
+:onerror Err {
+ :global GlobalConfigReady; :global GlobalFunctionsReady;
+ :retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
+ do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ];
:local Seen ({});
@@ -40,4 +41,6 @@
}
:set ($Seen->$Mac) 1;
}
-} on-error={ }
+} do={
+ :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
+}