aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2022-06-15 09:59:50 +0200
committerGravatar Christian Hesse <mail@eworm.de>2022-06-15 10:01:48 +0200
commit5dc23dd26743b788b891b4f3fb3ea6a7dbbc5941 (patch)
tree8a08c9c1f57a9c2d491b490f14a687b2cc88e5eb /mod
parent5b3b3e182b46f8434f083d1b46eee485f3d0116d (diff)
mod/bridge-port-to: move reenable to correct level
Diffstat (limited to 'mod')
-rw-r--r--mod/bridge-port-to12
1 files changed, 6 insertions, 6 deletions
diff --git a/mod/bridge-port-to b/mod/bridge-port-to
index dec5eb1..415a04d 100644
--- a/mod/bridge-port-to
+++ b/mod/bridge-port-to
@@ -15,9 +15,9 @@
:global LogPrintExit2;
:global ParseKeyValueStore;
+ :local InterfaceReEnable [ :toarray "" ];
:foreach BridgePort in=[ /interface/bridge/port/find where !(comment=[]) ] do={
:local BridgePortVal [ /interface/bridge/port/get $BridgePort ];
- :local InterfaceReEnable [ :toarray "" ];
:foreach Config,BridgeDefault in=[ $ParseKeyValueStore ($BridgePortVal->"comment") ] do={
:if ($Config = $BridgePortTo) do={
:local DHCPClient [ /ip/dhcp-client/find where interface=$BridgePortVal->"interface" comment="toggle with bridge port" ];
@@ -53,11 +53,11 @@
}
}
}
- :if ([ :len $InterfaceReEnable ] > 0) do={
- :delay 2s;
- :foreach Interface in=$InterfaceReEnable do={
- /interface/ethernet/enable [ find where name=$Interface ];
- }
+ }
+ :if ([ :len $InterfaceReEnable ] > 0) do={
+ :delay 2s;
+ :foreach Interface in=$InterfaceReEnable do={
+ /interface/ethernet/enable [ find where name=$Interface ];
}
}
}