X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/b577c05d0145a6daea265427f85bed96235eab9e..ee2ccdb351eeaa09fde5a9667958cac94977fa0c:/cookbooks/hardware/templates/default/ohai.rb.erb?ds=sidebyside 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