Skip to content

Commit

Permalink
Merge 324ee9a into 1c38602
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Jul 3, 2019
2 parents 1c38602 + 324ee9a commit 56150fe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/include/network/lan/complex.rb
Expand Up @@ -306,6 +306,8 @@ def enableDisableButtons
# Automatically configures slaves when user enslaves them into a bond or bridge device
def UpdateSlaves
current = LanItems.current
master_builder = Y2Network::InterfaceConfigBuilder.for(LanItems.GetCurrentType())
master_builder.name = LanItems.GetCurrentName()

Lan.autoconf_slaves.each do |dev|
if LanItems.FindAndSelect(dev)
Expand All @@ -328,7 +330,7 @@ def UpdateSlaves
# in related sysconfig scripts or makes no sence for slaves (e.g. ip configuration).
builder["NETMASK"] = ""
builder["BOOTPROTO"] = "none"
case builder.type
case master_builder.type
when "bond"
LanItems.startmode = "hotplug"
# If there is already a rule based on the bus_id, do not update it.
Expand All @@ -337,6 +339,8 @@ def UpdateSlaves
end
when "br"
builder["IPADDR"] = ""
else
raise "Adapting slaves for wrong type #{master_builder.type.inspect}"
end

LanItems.Commit(builder)
Expand Down

0 comments on commit 56150fe

Please sign in to comment.