mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
mod/bridge-port-to: move reenable to correct level
This commit is contained in:
parent
5b3b3e182b
commit
5dc23dd267
1 changed files with 6 additions and 6 deletions
|
@ -15,9 +15,9 @@
|
||||||
:global LogPrintExit2;
|
:global LogPrintExit2;
|
||||||
:global ParseKeyValueStore;
|
:global ParseKeyValueStore;
|
||||||
|
|
||||||
|
:local InterfaceReEnable [ :toarray "" ];
|
||||||
:foreach BridgePort in=[ /interface/bridge/port/find where !(comment=[]) ] do={
|
:foreach BridgePort in=[ /interface/bridge/port/find where !(comment=[]) ] do={
|
||||||
:local BridgePortVal [ /interface/bridge/port/get $BridgePort ];
|
:local BridgePortVal [ /interface/bridge/port/get $BridgePort ];
|
||||||
:local InterfaceReEnable [ :toarray "" ];
|
|
||||||
:foreach Config,BridgeDefault in=[ $ParseKeyValueStore ($BridgePortVal->"comment") ] do={
|
:foreach Config,BridgeDefault in=[ $ParseKeyValueStore ($BridgePortVal->"comment") ] do={
|
||||||
:if ($Config = $BridgePortTo) do={
|
:if ($Config = $BridgePortTo) do={
|
||||||
:local DHCPClient [ /ip/dhcp-client/find where interface=$BridgePortVal->"interface" comment="toggle with bridge port" ];
|
:local DHCPClient [ /ip/dhcp-client/find where interface=$BridgePortVal->"interface" comment="toggle with bridge port" ];
|
||||||
|
@ -53,11 +53,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
:if ([ :len $InterfaceReEnable ] > 0) do={
|
:if ([ :len $InterfaceReEnable ] > 0) do={
|
||||||
:delay 2s;
|
:delay 2s;
|
||||||
:foreach Interface in=$InterfaceReEnable do={
|
:foreach Interface in=$InterfaceReEnable do={
|
||||||
/interface/ethernet/enable [ find where name=$Interface ];
|
/interface/ethernet/enable [ find where name=$Interface ];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue