mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
accesslist-duplicates: RouterOS v7 path syntax
This commit is contained in:
parent
d98d69a8c9
commit
ab410466dc
3 changed files with 12 additions and 12 deletions
|
@ -17,8 +17,8 @@
|
|||
:local Seen [ :toarray "" ];
|
||||
:local Shown [ :toarray "" ];
|
||||
|
||||
: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 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 SeenMac in=$Seen do={
|
||||
:if ($SeenMac = $Mac) do={
|
||||
:local Skip 0;
|
||||
|
@ -26,14 +26,14 @@
|
|||
:if ($ShownMac = $Mac) do={ :set Skip 1; }
|
||||
}
|
||||
:if ($Skip = 0) do={
|
||||
/ caps-man access-list print where mac-address=$Mac;
|
||||
/caps-man/access-list/print where mac-address=$Mac;
|
||||
:set Shown ($Shown, $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;
|
||||
/caps-man/access-list/remove $Remove;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
:local Seen [ :toarray "" ];
|
||||
:local Shown [ :toarray "" ];
|
||||
|
||||
: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 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 SeenMac in=$Seen do={
|
||||
:if ($SeenMac = $Mac) do={
|
||||
:local Skip 0;
|
||||
|
@ -26,14 +26,14 @@
|
|||
:if ($ShownMac = $Mac) do={ :set Skip 1; }
|
||||
}
|
||||
:if ($Skip = 0) do={
|
||||
/ interface wireless access-list print where mac-address=$Mac;
|
||||
/interface/wireless/access-list/print where mac-address=$Mac;
|
||||
:set Shown ($Shown, $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");
|
||||
/ interface wireless access-list remove $Remove;
|
||||
/interface/wireless/access-list/remove $Remove;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
:local Seen [ :toarray "" ];
|
||||
:local Shown [ :toarray "" ];
|
||||
|
||||
: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 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 SeenMac in=$Seen do={
|
||||
:if ($SeenMac = $Mac) do={
|
||||
:local Skip 0;
|
||||
|
@ -27,14 +27,14 @@
|
|||
:if ($ShownMac = $Mac) do={ :set Skip 1; }
|
||||
}
|
||||
:if ($Skip = 0) do={
|
||||
/ %PATH% access-list print where mac-address=$Mac;
|
||||
/%PATH%/access-list/print where mac-address=$Mac;
|
||||
:set Shown ($Shown, $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");
|
||||
/ %PATH% access-list remove $Remove;
|
||||
/%PATH%/access-list/remove $Remove;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue