mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-08-04 02:05:01 +02:00
accesslist-duplicates: support interactive removal
This commit is contained in:
parent
ecf75697ba
commit
0b121705b2
3 changed files with 27 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue