]> git.openstreetmap.org Git - chef.git/commitdiff
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 640e1676815004a90a567f5fba022d19bcc1d52a..05043dc7116d65535613cf191184efc7d84485f4 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 b4986e70e34a6eba5b2b034e3c471ce0b526d275..1418e74181551552ce094b60f84e703027c03236 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|