aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2022-06-30 08:59:27 +0200
committerGravatar Christian Hesse <mail@eworm.de>2022-06-30 08:59:27 +0200
commit3434ea9d79e35f90b605a6397f8091da354be42b (patch)
tree85d724d6da7874acfa496e9cc1558ee5c33b101b /mod
parente27a0166baeb8ce711b113499a08c75c2750493f (diff)
mod/bridge-port-to: re-enable interfaces by id
Diffstat (limited to 'mod')
-rw-r--r--mod/bridge-port-to10
1 files changed, 3 insertions, 7 deletions
diff --git a/mod/bridge-port-to b/mod/bridge-port-to
index efeb02a..ae74824 100644
--- a/mod/bridge-port-to
+++ b/mod/bridge-port-to
@@ -11,7 +11,6 @@
:set BridgePortTo do={
:local BridgePortTo [ :tostr $1 ];
- :global CharacterReplace;
:global IfThenElse;
:global LogPrintExit2;
:global ParseKeyValueStore;
@@ -47,7 +46,7 @@
:local Disable [ /interface/ethernet/find where name=$BridgePortVal->"interface" ];
:if ([ :len $Disable ] > 0) do={
/interface/ethernet/disable $Disable;
- :set InterfaceReEnable ($InterfaceReEnable, $BridgePortVal->"interface");
+ :set InterfaceReEnable ($InterfaceReEnable, $Disable);
}
/interface/bridge/port/set disabled=no bridge=$BridgeDefault $BridgePort;
} else={
@@ -60,10 +59,7 @@
}
:if ([ :len $InterfaceReEnable ] > 0) do={
:delay 2s;
- $LogPrintExit2 info $0 ("Re-enabling interfaces: " . \
- [ $CharacterReplace [ :tostr $InterfaceReEnable ] ";" " " ]) false;
- :foreach Interface in=$InterfaceReEnable do={
- /interface/ethernet/enable [ find where name=$Interface ];
- }
+ $LogPrintExit2 info $0 ("Re-enabling interfaces...") false;
+ /interface/ethernet/enable $InterfaceReEnable;
}
}