X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/b5fb6f1ea5350f2d792a6f882b47631ac67ee407..0bba2366d12a23df735f541d29ae99561479da6d:/cookbooks/hardware/attributes/default.rb diff --git a/cookbooks/hardware/attributes/default.rb b/cookbooks/hardware/attributes/default.rb index 24dc2505d..904b51e36 100644 --- a/cookbooks/hardware/attributes/default.rb +++ b/cookbooks/hardware/attributes/default.rb @@ -10,15 +10,9 @@ if node[:dmi] and node[:dmi][:system] end if node[:kernel] and node[:kernel][:modules] - if node[:kernel][:modules].include?("mpt2sas") - default[:apt][:sources] |= [ "hwraid" ] - end - - if node[:kernel][:modules].include?("megaraid_sas") - default[:apt][:sources] |= [ "hwraid" ] - end + raidmods = node[:kernel][:modules].keys & ["cciss", "hpsa", "mptsas", "mpt2sas", "megaraid_mm", "megaraid_sas", "aacraid"] - if node[:kernel][:modules].include?("aacraid") + unless raidmods.empty? default[:apt][:sources] |= [ "hwraid" ] end end