diff options
author | Christian Hesse <mail@eworm.de> | 2023-10-16 21:46:10 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2023-10-17 14:05:03 +0200 |
commit | 00e8766ce357126939d7441da8fba9c6ca25984b (patch) | |
tree | 8035a86114f796578145bafdc32924401d537c3c /accesslist-duplicates.template.rsc | |
parent | 8bfbc9dd7edb6792da9397b0b056d40060da9bbc (diff) |
accesslist-duplicates: use another named array
Diffstat (limited to 'accesslist-duplicates.template.rsc')
-rw-r--r-- | accesslist-duplicates.template.rsc | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/accesslist-duplicates.template.rsc b/accesslist-duplicates.template.rsc index 0bacd0d..28c851c 100644 --- a/accesslist-duplicates.template.rsc +++ b/accesslist-duplicates.template.rsc @@ -24,22 +24,19 @@ :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 ]; - :foreach SeenMac in=$Seen do={ - :if ($SeenMac = $Mac && $Shown->$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; - - :put "\nNumeric id to remove, any key to skip!"; - :local Remove [ :tonum [ $Read ] ]; - :if ([ :typeof $Remove ] = "num") do={ - :put ("Removing numeric id " . $Remove . "...\n"); - /caps-man/access-list/remove $Remove; - /interface/wifiwave2/access-list/remove $Remove; - /interface/wireless/access-list/remove $Remove; - } - :set ($Shown->$Mac) 1; + :if ($Seen->$Mac = 1 && $Shown->$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; + :put "\nNumeric id to remove, any key to skip!"; + :local Remove [ :tonum [ $Read ] ]; + :if ([ :typeof $Remove ] = "num") do={ + :put ("Removing numeric id " . $Remove . "...\n"); + /caps-man/access-list/remove $Remove; + /interface/wifiwave2/access-list/remove $Remove; + /interface/wireless/access-list/remove $Remove; } + :set ($Shown->$Mac) 1; } - :set Seen ($Seen, $Mac); + :set ($Seen->$Mac) 1; } |