From: Tom Hughes Date: Thu, 26 Nov 2015 17:22:52 +0000 (+0000) Subject: Don't try and run megacli before it is installed X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/297f05f5840e832792b007fab67d399a9480326a?hp=240370ecf151a61a7b2fddbfc035d60ee9a11863 Don't try and run megacli before it is installed --- diff --git a/cookbooks/hardware/metadata.rb b/cookbooks/hardware/metadata.rb index 640e16768..05043dc71 100644 --- a/cookbooks/hardware/metadata.rb +++ b/cookbooks/hardware/metadata.rb @@ -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" diff --git a/cookbooks/hardware/recipes/default.rb b/cookbooks/hardware/recipes/default.rb index b4986e70e..1418e7418 100644 --- a/cookbooks/hardware/recipes/default.rb +++ b/cookbooks/hardware/recipes/default.rb @@ -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|