aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2023-10-17 00:01:38 +0200
committerGravatar Christian Hesse <mail@eworm.de>2023-10-17 14:05:03 +0200
commitab44377fb6d01a2b7ccfab71ebf68b9306bc4df7 (patch)
tree5378c79e739f39f9c5fd2ec0f96e6f26b93aaa1b
parent00e8766ce357126939d7441da8fba9c6ca25984b (diff)
accesslist-duplicates: remove extra check
Why did we have that? Possibly for performance? Well, should not be a problem now.
-rw-r--r--accesslist-duplicates.capsman.rsc4
-rw-r--r--accesslist-duplicates.local.rsc4
-rw-r--r--accesslist-duplicates.template.rsc4
-rw-r--r--accesslist-duplicates.wifiwave2.rsc4
4 files changed, 4 insertions, 12 deletions
diff --git a/accesslist-duplicates.capsman.rsc b/accesslist-duplicates.capsman.rsc
index b09ef6a..b986862 100644
--- a/accesslist-duplicates.capsman.rsc
+++ b/accesslist-duplicates.capsman.rsc
@@ -15,11 +15,10 @@
:global Read;
:local Seen ({});
-:local Shown ({});
:foreach AccList in=[ /caps-man/access-list/find where mac-address!="00:00:00:00:00:00" ] do={
:local Mac [ /caps-man/access-list/get $AccList mac-address ];
- :if ($Seen->$Mac = 1 && $Shown->$Mac != 1) do={
+ :if ($Seen->$Mac = 1) do={
/caps-man/access-list/print where mac-address=$Mac;
:put "\nNumeric id to remove, any key to skip!";
:local Remove [ :tonum [ $Read ] ];
@@ -27,7 +26,6 @@
:put ("Removing numeric id " . $Remove . "...\n");
/caps-man/access-list/remove $Remove;
}
- :set ($Shown->$Mac) 1;
}
:set ($Seen->$Mac) 1;
}
diff --git a/accesslist-duplicates.local.rsc b/accesslist-duplicates.local.rsc
index bffee5a..b136de3 100644
--- a/accesslist-duplicates.local.rsc
+++ b/accesslist-duplicates.local.rsc
@@ -15,11 +15,10 @@
:global Read;
:local Seen ({});
-:local Shown ({});
: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 && $Shown->$Mac != 1) do={
+ :if ($Seen->$Mac = 1) do={
/interface/wireless/access-list/print where mac-address=$Mac;
:put "\nNumeric id to remove, any key to skip!";
:local Remove [ :tonum [ $Read ] ];
@@ -27,7 +26,6 @@
:put ("Removing numeric id " . $Remove . "...\n");
/interface/wireless/access-list/remove $Remove;
}
- :set ($Shown->$Mac) 1;
}
:set ($Seen->$Mac) 1;
}
diff --git a/accesslist-duplicates.template.rsc b/accesslist-duplicates.template.rsc
index 28c851c..1e5fc80 100644
--- a/accesslist-duplicates.template.rsc
+++ b/accesslist-duplicates.template.rsc
@@ -16,7 +16,6 @@
:global Read;
:local Seen ({});
-:local Shown ({});
:foreach AccList in=[ /caps-man/access-list/find where mac-address!="00:00:00:00:00:00" ] do={
:foreach AccList in=[ /interface/wifiwave2/access-list/find where mac-address!="00:00:00:00:00:00" ] do={
@@ -24,7 +23,7 @@
:local Mac [ /caps-man/access-list/get $AccList mac-address ];
:local Mac [ /interface/wifiwave2/access-list/get $AccList mac-address ];
:local Mac [ /interface/wireless/access-list/get $AccList mac-address ];
- :if ($Seen->$Mac = 1 && $Shown->$Mac != 1) do={
+ :if ($Seen->$Mac = 1) do={
/caps-man/access-list/print where mac-address=$Mac;
/interface/wifiwave2/access-list/print where mac-address=$Mac;
/interface/wireless/access-list/print where mac-address=$Mac;
@@ -36,7 +35,6 @@
/interface/wifiwave2/access-list/remove $Remove;
/interface/wireless/access-list/remove $Remove;
}
- :set ($Shown->$Mac) 1;
}
:set ($Seen->$Mac) 1;
}
diff --git a/accesslist-duplicates.wifiwave2.rsc b/accesslist-duplicates.wifiwave2.rsc
index 6897a51..4297898 100644
--- a/accesslist-duplicates.wifiwave2.rsc
+++ b/accesslist-duplicates.wifiwave2.rsc
@@ -15,11 +15,10 @@
:global Read;
:local Seen ({});
-:local Shown ({});
:foreach AccList in=[ /interface/wifiwave2/access-list/find where mac-address!="00:00:00:00:00:00" ] do={
:local Mac [ /interface/wifiwave2/access-list/get $AccList mac-address ];
- :if ($Seen->$Mac = 1 && $Shown->$Mac != 1) do={
+ :if ($Seen->$Mac = 1) do={
/interface/wifiwave2/access-list/print where mac-address=$Mac;
:put "\nNumeric id to remove, any key to skip!";
:local Remove [ :tonum [ $Read ] ];
@@ -27,7 +26,6 @@
:put ("Removing numeric id " . $Remove . "...\n");
/interface/wifiwave2/access-list/remove $Remove;
}
- :set ($Shown->$Mac) 1;
}
:set ($Seen->$Mac) 1;
}