From: Tom Hughes Date: Tue, 26 Apr 2016 17:57:56 +0000 (+0100) Subject: Fix collection of PSU details from dmidecode X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/1482fd1105597fca4262ace6ef2a9016aa228a24 Fix collection of PSU details from dmidecode --- diff --git a/cookbooks/hardware/templates/default/ohai.rb.erb b/cookbooks/hardware/templates/default/ohai.rb.erb index 1e7ca8713..bec49f967 100644 --- a/cookbooks/hardware/templates/default/ohai.rb.erb +++ b/cookbooks/hardware/templates/default/ohai.rb.erb @@ -865,6 +865,7 @@ Ohai.plugin(:Hardware) do end def psu_devices + devices = {} device = nil IO.popen(["dmidecode", "-t", "39"]).each_with_object([]) do |line, devices| @@ -877,6 +878,8 @@ Ohai.plugin(:Hardware) do device = nil end end + + devices end def mc_device