aboutsummaryrefslogtreecommitdiffstats
path: root/accesslist-duplicates.local.rsc
diff options
context:
space:
mode:
Diffstat (limited to 'accesslist-duplicates.local.rsc')
-rw-r--r--accesslist-duplicates.local.rsc14
1 files changed, 7 insertions, 7 deletions
diff --git a/accesslist-duplicates.local.rsc b/accesslist-duplicates.local.rsc
index 589815d..03a9724 100644
--- a/accesslist-duplicates.local.rsc
+++ b/accesslist-duplicates.local.rsc
@@ -10,11 +10,11 @@
#
# !! Do not edit this file, it is generated from template!
-:global GlobalFunctionsReady;
-:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
-
:local ExitOK false;
-:do {
+: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 ({});
@@ -22,7 +22,7 @@
:foreach AccList in=[ /interface/wireless/access-list/find where mac-address!="00:00:00:00:00:00" ] do={
:local Mac [ /interface/wireless/access-list/get $AccList mac-address ];
:if ($Seen->$Mac = 1) do={
- /interface/wireless/access-list/print where mac-address=$Mac;
+ /interface/wireless/access-list/print without-paging where mac-address=$Mac;
:local Remove [ :tonum [ /terminal/ask prompt="\nNumeric id to remove, any key to skip!" ] ];
:if ([ :typeof $Remove ] = "num") do={
@@ -32,6 +32,6 @@
}
:set ($Seen->$Mac) 1;
}
-} on-error={
- :global ExitError; $ExitError $ExitOK [ :jobname ];
+} do={
+ :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
}