1 default[:hardware][:modules] = %w[lp]
2 default[:hardware][:grub][:cmdline] = %w[nomodeset]
3 default[:hardware][:sensors] = {}
4 default[:hardware][:ipmi][:excluded_sensors] = []
6 if node[:dmi] && node[:dmi][:system]
7 case node[:dmi][:system][:manufacturer]
9 default[:apt][:sources] |= ["management-component-pack"]
11 case node[:dmi][:system][:product_name]
12 when "ProLiant DL360 G6", "ProLiant DL360 G7", "ProLiant SE326M1R2"
13 default[:hardware][:sensors][:"power_meter-*"][:power][:power1] = { :ignore => true }
18 if Chef::Util.compare_versions(node[:kernel][:release], [3, 3]).negative?
19 default[:hardware][:modules] |= ["microcode"]
21 if node[:cpu][:"0"][:vendor_id] == "GenuineIntel"
22 default[:hardware][:modules] |= ["coretemp"]
26 if node[:kernel] && node[:kernel][:modules]
27 raidmods = node[:kernel][:modules].keys & %w[cciss hpsa mptsas mpt2sas mpt3sas megaraid_mm megaraid_sas aacraid]
29 default[:apt][:sources] |= ["hwraid"] unless raidmods.empty?
32 if node[:kernel][:modules].include?("ipmi_si")
33 default[:hardware][:modules] |= ["ipmi_devintf"]
36 if File.exist?("/proc/xen")
37 default[:hardware][:watchdog] = "xen_wdt"
38 elsif node[:kernel][:modules].include?("i6300esb")
39 default[:hardware][:watchdog] = "none"
42 if File.exist?("/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor") &&
43 File.read("/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor").chomp == "ondemand"
44 default[:sysfs][:cpufreq_ondemand][:comment] = "Tune the ondemand CPU frequency governor"
45 default[:sysfs][:cpufreq_ondemand][:parameters][:"devices/system/cpu/cpufreq/ondemand/up_threshold"] = "25"
46 default[:sysfs][:cpufreq_ondemand][:parameters][:"devices/system/cpu/cpufreq/ondemand/sampling_down_factor"] = "100"