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.rsc18
1 files changed, 9 insertions, 9 deletions
diff --git a/accesslist-duplicates.template.rsc b/accesslist-duplicates.template.rsc
index ccbca3d..bf23147 100644
--- a/accesslist-duplicates.template.rsc
+++ b/accesslist-duplicates.template.rsc
@@ -11,11 +11,11 @@
# !! 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; }
-
: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 ({});
@@ -27,9 +27,9 @@
:local Mac [ /interface/wifi/access-list/get $AccList mac-address ];
:local Mac [ /interface/wireless/access-list/get $AccList mac-address ];
:if ($Seen->$Mac = 1) do={
- /caps-man/access-list/print where mac-address=$Mac;
- /interface/wifi/access-list/print where mac-address=$Mac;
- /interface/wireless/access-list/print where mac-address=$Mac;
+ /caps-man/access-list/print without-paging where mac-address=$Mac;
+ /interface/wifi/access-list/print without-paging 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={
@@ -41,6 +41,6 @@
}
:set ($Seen->$Mac) 1;
}
-} on-error={
- :global ExitError; $ExitError $ExitOK [ :jobname ];
+} do={
+ :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
}