Skip to content

Commit

Permalink
Moved storing bridge ports configuration out of validation handler.
Browse files Browse the repository at this point in the history
  • Loading branch information
mchf committed Jun 20, 2014
1 parent d17b993 commit 71ace24
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/include/network/lan/bridge.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ def configure_as_bridge_port(device)
end

def ValidateBridge(key, event)
old_name = NetworkInterfaces.Name
valid = true
confirmed = false
sel = UI.QueryWidget(Id("BRIDGE_PORTS"), :SelectedItems)
Expand Down Expand Up @@ -99,17 +98,9 @@ def ValidateBridge(key, event)
)
confirmed = true
end
if valid
i = LanItems.current
if LanItems.FindAndSelect(device)
configure_as_bridge_port(device)
LanItems.current = i
end
end
end
end
end
NetworkInterfaces.Select(old_name)
valid
end
end
Expand Down
6 changes: 6 additions & 0 deletions src/modules/LanItems.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def main
Yast.include self, "network/routines.rb"
Yast.include self, "network/lan/s390.rb"
Yast.include self, "network/lan/udev.rb"
Yast.include self, "network/lan/bridge.rb"

# Hardware information
# @see #ReadHardware
Expand Down Expand Up @@ -2117,6 +2118,11 @@ def Commit

Ops.set(@Items, [@current, "ifcfg"], "") if !NetworkInterfaces.Commit

# configure bridge ports
if @bridge_ports
@bridge_ports.split.each { |bp| configure_as_bridge_port(bp) }
end

@modified = true
@operation = nil
true
Expand Down

0 comments on commit 71ace24

Please sign in to comment.