Don't try and run megacli before it is installed
authorTom Hughes <tom@compton.nu>
Thu, 26 Nov 2015 17:22:52 +0000 (17:22 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 26 Nov 2015 17:22:52 +0000 (17:22 +0000)
cookbooks/hardware/metadata.rb
cookbooks/hardware/recipes/default.rb

index 640e167..05043dc 100644 (file)
@@ -5,6 +5,7 @@ license           "Apache 2.0"
 description       "Configures hardware"
 long_description  IO.read(File.join(File.dirname(__FILE__), "README.md"))
 version           "1.0.0"
+depends           "apt"
 depends           "git"
 depends           "munin"
 depends           "tools"
index b4986e7..1418e74 100644 (file)
@@ -307,7 +307,7 @@ if status_packages["cciss-vol-status"] && File.exist?("/usr/sbin/cciss_vol_statu
   end
 end
 
-if status_packages["megaclisas-status"]
+if status_packages["megaclisas-status"] && File.exist?("/usr/sbin/megacli")
   controller = 0
 
   Dir.glob("/sys/class/scsi_host/host*") do |host|