# Remove legacy HP G4 support which breaks modern hp-health 10.4
if manufacturer == "HP"
- %w(/opt/hp/hp-health/bin/hpasmd /usr/lib/libhpasmintrfc.so.3.0 %/usr/lib/libhpasmintrfc.so.3 /usr/lib/libhpasmintrfc.so).each do |filename|
+ %w[/opt/hp/hp-health/bin/hpasmd /usr/lib/libhpasmintrfc.so.3.0 %/usr/lib/libhpasmintrfc.so.3 /usr/lib/libhpasmintrfc.so].each do |filename|
file filename do
action :delete
end
end
end
-%w(hpssacli lsiutil sas2ircu megactl megacli arcconf).each do |tools_package|
+%w[hpssacli lsiutil sas2ircu megactl megacli arcconf].each do |tools_package|
if tools_packages.include?(tools_package)
package tools_package
else
disks = disks.compact
-if disks.count > 0
+if disks.count.positive?
package "smartmontools"
template "/usr/local/bin/smartd-mailer" do
end
end
-if disks.count > 0
+if disks.count.positive?
munin_plugin "hddtemp_smartctl" do
conf "munin.hddtemp.erb"
conf_variables :disks => disks