Skip to content

Commit

Permalink
Fixed misussed API. bnc#930448
Browse files Browse the repository at this point in the history
Network heavilly accesses NetworkInterfaces' internal structurei and
state.i This time it stopped working due to fixes done elsewhere.
  • Loading branch information
mchf committed Jun 18, 2015
1 parent eb427a2 commit 8b2bfd7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/modules/LanItems.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1229,7 +1229,7 @@ def BuildBondIndex
deep_copy(index)
end

def startmode_overview
def startmode_overview(item_id)
startmode_descrs = {
# summary description of STARTMODE=auto
"auto" => _(
Expand Down Expand Up @@ -1257,7 +1257,8 @@ def startmode_overview
)
}

startmode_descr = startmode_descrs[NetworkInterfaces.Current["STARTMODE"].to_s] || _("Started manually")
ifcfg = GetDeviceMap(item_id) || {}
startmode_descr = startmode_descrs[ifcfg["STARTMODE"].to_s] || _("Started manually")

[startmode_descr]
end
Expand Down Expand Up @@ -1323,7 +1324,7 @@ def BuildLanOverview
)

bullets << _("Device Name: %s") % ifcfg_name
bullets += startmode_overview
bullets += startmode_overview(key)
bullets += ip_overview(ip) if ifcfg_conf["STARTMODE"] != "managed"

if LanItems.type == "wlan" &&
Expand Down

0 comments on commit 8b2bfd7

Please sign in to comment.