aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2022-06-30 08:59:08 +0200
committerGravatar Christian Hesse <mail@eworm.de>2022-06-30 08:59:08 +0200
commite27a0166baeb8ce711b113499a08c75c2750493f (patch)
tree54990a16c08fb338a5656cb208bb6cb41c5e0058
parentf26fb7c05feb8a56d6c567d67a60ee0229569fd4 (diff)
mod/bridge-port-vlan: re-enable interfaces by id
-rw-r--r--mod/bridge-port-vlan10
1 files changed, 3 insertions, 7 deletions
diff --git a/mod/bridge-port-vlan b/mod/bridge-port-vlan
index a79bda0..a43d7d7 100644
--- a/mod/bridge-port-vlan
+++ b/mod/bridge-port-vlan
@@ -11,7 +11,6 @@
:global BridgePortVlan do={
:local ConfigTo [ :tostr $1 ];
- :global CharacterReplace;
:global IfThenElse;
:global LogPrintExit2;
:global ParseKeyValueStore;
@@ -55,7 +54,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 pvid=$Vlan $BridgePort;
} else={
@@ -68,10 +67,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;
}
}