]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/hardware/templates/default/ohai.rb.erb
Fix collection of PSU details from dmidecode
[chef.git] / cookbooks / hardware / templates / default / ohai.rb.erb
index 1e7ca8713154bc88884ee8a3ca4e0d96b414a50a..bec49f967f38ed1151f00819f3ad533e8de65b25 100644 (file)
@@ -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