From fb9cd4b55ad7b3b7c28993305b23c7893885e90d Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 18 May 2016 08:58:57 +0100 Subject: [PATCH] Fix identification of HP RID controllers with newer kernels --- cookbooks/hardware/templates/default/ohai.rb.erb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cookbooks/hardware/templates/default/ohai.rb.erb b/cookbooks/hardware/templates/default/ohai.rb.erb index 1e7ca8713..fec5d6bf3 100644 --- a/cookbooks/hardware/templates/default/ohai.rb.erb +++ b/cookbooks/hardware/templates/default/ohai.rb.erb @@ -358,6 +358,8 @@ Ohai.plugin(:Hardware) do controller[:device] = File.basename(device).sub(/^cciss(\d+)$/, "/dev/cciss/c\\1d0") elsif device = Dir.glob("/sys/bus/pci/devices/#{controller[:pci_slot]}/host*/target*:3:0/*:3:0:0/scsi_generic/sg*").first controller[:device] = "/dev/#{File.basename(device)}" + elsif device = Dir.glob("/sys/bus/pci/devices/#{controller[:pci_slot]}/host*/target*:1:0/*:1:0:0/scsi_generic/sg*").first + controller[:device] = "/dev/#{File.basename(device)}" end end end -- 2.39.5