From 6f06f4d8a4f0c024f7af2eab85e60a5b1908e47c Mon Sep 17 00:00:00 2001 From: Bryan McLellan Date: Thu, 30 Aug 2012 12:57:39 -0700 Subject: [PATCH] CHEF-3380: Don't fail redhat service on stop or disable if init script is missing --- chef/lib/chef/provider/service/redhat.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chef/lib/chef/provider/service/redhat.rb b/chef/lib/chef/provider/service/redhat.rb index e62bc97e0d4..629e4ee0c3a 100644 --- a/chef/lib/chef/provider/service/redhat.rb +++ b/chef/lib/chef/provider/service/redhat.rb @@ -45,7 +45,7 @@ def define_resource_requirements a.failure_message Chef::Exceptions::Service, "#{chkconfig_file} does not exist!" end - requirements.assert(:all_actions) do |a| + requirements.assert(:start, :enable, :reload, :restart) do |a| a.assertion { !@service_missing } 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."