mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
bridge-port-to-default: delay only when required
This commit is contained in:
parent
6b089a1425
commit
b6e2b8c3e4
1 changed files with 5 additions and 3 deletions
|
@ -4,13 +4,15 @@
|
||||||
#
|
#
|
||||||
# reset bridge ports to default bridge
|
# reset bridge ports to default bridge
|
||||||
|
|
||||||
# delay for global-config
|
|
||||||
:delay 1s;
|
|
||||||
|
|
||||||
:global "bridge-port-to";
|
:global "bridge-port-to";
|
||||||
|
|
||||||
:local "len" ([ :len $"bridge-port-to" ] + 1);
|
:local "len" ([ :len $"bridge-port-to" ] + 1);
|
||||||
|
|
||||||
|
:if ($"len" = 1) do={
|
||||||
|
:delay 1s;
|
||||||
|
:set "len" ([ :len $"bridge-port-to" ] + 1);
|
||||||
|
}
|
||||||
|
|
||||||
:foreach interface in=[ / interface bridge port find where comment!="" ] do={
|
:foreach interface in=[ / interface bridge port find where comment!="" ] do={
|
||||||
:foreach comment in=[ :toarray [ / interface bridge port get $interface comment ] ] do={
|
:foreach comment in=[ :toarray [ / interface bridge port get $interface comment ] ] do={
|
||||||
:if ([ :pick $comment 0 $len ] = ($"bridge-port-to" . ":")) do={
|
:if ([ :pick $comment 0 $len ] = ($"bridge-port-to" . ":")) do={
|
||||||
|
|
Loading…
Reference in a new issue