diff options
author | andy-dufour <adufour@chef.io> | 2015-09-29 16:34:56 -0400 |
---|---|---|
committer | andy-dufour <adufour@chef.io> | 2015-09-29 16:34:56 -0400 |
commit | 5d890056a1e8782af98b3d4efe4dded3494404c9 (patch) | |
tree | 9e5d9fbbc4209f80fb6f3917fc27560c8c593e6d /lib/chef/provider | |
parent | bc82c3e8603f6908d80fc29beb1d0902563398e7 (diff) | |
download | chef-5d890056a1e8782af98b3d4efe4dded3494404c9.tar.gz |
Adding check for custom command in redhat service provider and providing more explicit error message if init.d script or custom command is not found.
Diffstat (limited to 'lib/chef/provider')
-rw-r--r-- | lib/chef/provider/service/redhat.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/chef/provider/service/redhat.rb b/lib/chef/provider/service/redhat.rb index 33a9778715..dd44e441a8 100644 --- a/lib/chef/provider/service/redhat.rb +++ b/lib/chef/provider/service/redhat.rb @@ -61,7 +61,9 @@ class Chef end requirements.assert(:start, :enable, :reload, :restart) do |a| - a.assertion { !@service_missing } + a.assertion do + custom_command_for_action?(action) || !@service_missing + end a.failure_message Chef::Exceptions::Service, "#{new_resource}: unable to locate the init.d script!" a.whyrun "Assuming service would be disabled. The init script is not presently installed." end |