mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
accesslist-duplicates: support interactive removal
This commit is contained in:
parent
ecf75697ba
commit
0b121705b2
3 changed files with 27 additions and 0 deletions
|
@ -9,6 +9,8 @@
|
|||
:local seen [ :toarray "" ];
|
||||
:local shown [ :toarray "" ];
|
||||
|
||||
:global Read;
|
||||
|
||||
: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 ];
|
||||
:foreach "seen-mac" in=$seen do={
|
||||
|
@ -20,6 +22,13 @@
|
|||
:if ($skip = 0) do={
|
||||
/ caps-man access-list print where mac-address=$mac;
|
||||
:set $shown ( $shown , $mac );
|
||||
|
||||
:put "\nEnter to skip, numeric id to remove!";
|
||||
:local remove [ $Read ];
|
||||
:if ($remove != "") do={
|
||||
:put ("Removing numeric id " . $remove . "...\n");
|
||||
/ caps-man access-list remove $remove;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
:local seen [ :toarray "" ];
|
||||
:local shown [ :toarray "" ];
|
||||
|
||||
:global Read;
|
||||
|
||||
: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 ];
|
||||
:foreach "seen-mac" in=$seen do={
|
||||
|
@ -20,6 +22,13 @@
|
|||
:if ($skip = 0) do={
|
||||
/ interface wireless access-list print where mac-address=$mac;
|
||||
:set $shown ( $shown , $mac );
|
||||
|
||||
:put "\nEnter to skip, numeric id to remove!";
|
||||
:local remove [ $Read ];
|
||||
:if ($remove != "") do={
|
||||
:put ("Removing numeric id " . $remove . "...\n");
|
||||
/ interface wireless access-list remove $remove;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
:local seen [ :toarray "" ];
|
||||
:local shown [ :toarray "" ];
|
||||
|
||||
:global Read;
|
||||
|
||||
:foreach acclist in=[ / %PATH% access-list find where mac-address!="00:00:00:00:00:00" ] do={
|
||||
:local mac [ / %PATH% access-list get $acclist mac-address ];
|
||||
:foreach "seen-mac" in=$seen do={
|
||||
|
@ -21,6 +23,13 @@
|
|||
:if ($skip = 0) do={
|
||||
/ %PATH% access-list print where mac-address=$mac;
|
||||
:set $shown ( $shown , $mac );
|
||||
|
||||
:put "\nEnter to skip, numeric id to remove!";
|
||||
:local remove [ $Read ];
|
||||
:if ($remove != "") do={
|
||||
:put ("Removing numeric id " . $remove . "...\n");
|
||||
/ %PATH% access-list remove $remove;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue