From e27a0166baeb8ce711b113499a08c75c2750493f Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 30 Jun 2022 08:59:08 +0200 Subject: mod/bridge-port-vlan: re-enable interfaces by id --- mod/bridge-port-vlan | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'mod') 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; } } -- cgit v1.2.3-70-g09d2