From: Tom Hughes Date: Mon, 30 Nov 2015 14:08:58 +0000 (+0000) Subject: Handle disks attached to a Fusion-MPT controller but not in an array X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/412384fe580f11cb8478db079c19da97115f3193?hp=cab1fd4236f8d74f7d2cfa30e3ea30784ea70d58 Handle disks attached to a Fusion-MPT controller but not in an array --- diff --git a/cookbooks/hardware/templates/default/ohai.rb.erb b/cookbooks/hardware/templates/default/ohai.rb.erb index 88c620fd1..2874f3d65 100644 --- a/cookbooks/hardware/templates/default/ohai.rb.erb +++ b/cookbooks/hardware/templates/default/ohai.rb.erb @@ -435,9 +435,7 @@ Ohai.plugin(:Hardware) do controller[:arrays] << array[:id] arrays << array - - disk = nil - elsif array && line =~ /^Device is a Hard disk$/ + elsif line =~ /^Device is a Hard disk$/ disk = { :id => devices[:disks].count, :controller => controller[:id],