accesslist-duplicates: move code into function

This commit is contained in:
Christian Hesse 2024-03-04 13:48:00 +01:00
parent 64aa6ef124
commit efc2e75f01
5 changed files with 92 additions and 67 deletions

View file

@ -10,10 +10,12 @@
#
# !! Do not edit this file, it is generated from template!
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local Main do={
:local ScriptName [ :tostr $1 ];
:local Seen ({});
:foreach AccList in=[ /caps-man/access-list/find where mac-address!="00:00:00:00:00:00" ] do={
@ -29,3 +31,6 @@
}
:set ($Seen->$Mac) 1;
}
}
$Main [ :jobname ];

View file

@ -10,10 +10,12 @@
#
# !! Do not edit this file, it is generated from template!
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local Main do={
:local ScriptName [ :tostr $1 ];
:local Seen ({});
:foreach AccList in=[ /interface/wireless/access-list/find where mac-address!="00:00:00:00:00:00" ] do={
@ -29,3 +31,6 @@
}
:set ($Seen->$Mac) 1;
}
}
$Main [ :jobname ];

View file

@ -11,10 +11,12 @@
# !! This is just a template to generate the real script!
# !! Pattern '%TEMPL%' is replaced, paths are filtered.
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local Main do={
:local ScriptName [ :tostr $1 ];
:local Seen ({});
:foreach AccList in=[ /caps-man/access-list/find where mac-address!="00:00:00:00:00:00" ] do={
@ -42,3 +44,6 @@
}
:set ($Seen->$Mac) 1;
}
}
$Main [ :jobname ];

View file

@ -10,10 +10,12 @@
#
# !! Do not edit this file, it is generated from template!
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local Main do={
:local ScriptName [ :tostr $1 ];
:local Seen ({});
:foreach AccList in=[ /interface/wifi/access-list/find where mac-address!="00:00:00:00:00:00" ] do={
@ -29,3 +31,6 @@
}
:set ($Seen->$Mac) 1;
}
}
$Main [ :jobname ];

View file

@ -10,10 +10,12 @@
#
# !! Do not edit this file, it is generated from template!
:local 0 [ :jobname ];
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local Main do={
:local ScriptName [ :tostr $1 ];
:local Seen ({});
:foreach AccList in=[ /interface/wifiwave2/access-list/find where mac-address!="00:00:00:00:00:00" ] do={
@ -29,3 +31,6 @@
}
:set ($Seen->$Mac) 1;
}
}
$Main [ :jobname ];