summaryrefslogtreecommitdiff
path: root/lib/chef/provider/service/simple.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2015-08-19 19:13:30 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2015-08-25 09:57:00 -0700
commit9e398d9540c70e5a0bcaab554f3648055d97e8ba (patch)
treea5f8fcc45093d9e5d704dac0989c35129173053d /lib/chef/provider/service/simple.rb
parent16c56e408366e4af6bd469442342ecf597c5d9d9 (diff)
downloadchef-9e398d9540c70e5a0bcaab554f3648055d97e8ba.tar.gz
fix supports hash issues in service providers
- redhat provider now allows the user to override :status - gentoo provider now allows the user to override :status and :restart - service providers now dup the status hash and mutate their private copy instead of mutating the new_resource
Diffstat (limited to 'lib/chef/provider/service/simple.rb')
-rw-r--r--lib/chef/provider/service/simple.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/provider/service/simple.rb b/lib/chef/provider/service/simple.rb
index ee403ee163..d295513b42 100644
--- a/lib/chef/provider/service/simple.rb
+++ b/lib/chef/provider/service/simple.rb
@@ -76,7 +76,7 @@ class Chef
end
requirements.assert(:all_actions) do |a|
- a.assertion { @new_resource.status_command or @new_resource.supports[:status] or
+ a.assertion { @new_resource.status_command or supports[:status] or
(!ps_cmd.nil? and !ps_cmd.empty?) }
a.failure_message Chef::Exceptions::Service, "#{@new_resource} could not determine how to inspect the process table, please set this node's 'command.ps' attribute"
end
@@ -127,7 +127,7 @@ class Chef
nil
end
- elsif @new_resource.supports[:status]
+ elsif supports[:status]
Chef::Log.debug("#{@new_resource} supports status, running")
begin
if shell_out("#{default_init_command} status").exitstatus == 0