mirror of
https://github.com/nymurbd/MikroTik-scripts.git
synced 2025-12-23 10:39:31 +00:00
[ ... print count-only ...] -> [ :len [ ... find ... ] ]
Using 'print count-only' always prints a number to terminal, even if the value is evaluated in a condition or assigned to a variable. This can be quite annoying. Behavior will not chance (SUP-25503), so replacing the code...
This commit is contained in:
parent
92ca31a41d
commit
ff5cdc3019
20 changed files with 38 additions and 38 deletions
|
|
@ -8,8 +8,8 @@
|
|||
|
||||
:foreach Bridge in=[ / interface bridge find ] do={
|
||||
:local BrName [ / interface bridge get $Bridge name ];
|
||||
:if ([ / interface bridge port print count-only where bridge=$BrName ] > 0) do={
|
||||
:if ([ / interface bridge port print count-only where bridge=$BrName and inactive=no ] = 0) do={
|
||||
:if ([ :len [ / interface bridge port find where bridge=$BrName ] ] > 0) do={
|
||||
:if ([ :len [ / interface bridge port find where bridge=$BrName and inactive=no ] ] = 0) do={
|
||||
/ ip address disable [ find where !dynamic interface=$BrName ];
|
||||
} else={
|
||||
/ ip address enable [ find where !dynamic interface=$BrName ];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue