diff options
author | Christian Hesse <mail@eworm.de> | 2018-11-09 21:23:12 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2018-11-09 21:23:12 +0100 |
commit | 0b121705b2de98f0bc447afc88c0f5d4e73235bd (patch) | |
tree | 61fc1f1837694fde98db66d725a279bbed946c1c /accesslist-duplicates.template | |
parent | ecf75697ba6c7122df5ec305fd8b2d3e9f1466e2 (diff) |
accesslist-duplicates: support interactive removal
Diffstat (limited to 'accesslist-duplicates.template')
-rw-r--r-- | accesslist-duplicates.template | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/accesslist-duplicates.template b/accesslist-duplicates.template index 54b4a21..82712a0 100644 --- a/accesslist-duplicates.template +++ b/accesslist-duplicates.template @@ -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; + } } } } |