diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2015-08-19 19:13:30 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2015-08-25 09:57:00 -0700 |
commit | 9e398d9540c70e5a0bcaab554f3648055d97e8ba (patch) | |
tree | a5f8fcc45093d9e5d704dac0989c35129173053d /lib/chef/provider/service/redhat.rb | |
parent | 16c56e408366e4af6bd469442342ecf597c5d9d9 (diff) | |
download | chef-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/redhat.rb')
-rw-r--r-- | lib/chef/provider/service/redhat.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/provider/service/redhat.rb b/lib/chef/provider/service/redhat.rb index da86b2e2fc..33a9778715 100644 --- a/lib/chef/provider/service/redhat.rb +++ b/lib/chef/provider/service/redhat.rb @@ -42,7 +42,6 @@ class Chef def initialize(new_resource, run_context) super @init_command = "/sbin/service #{new_resource.service_name}" - new_resource.supports[:status] = true @service_missing = false @current_run_levels = [] end @@ -69,6 +68,8 @@ class Chef end def load_current_resource + supports[:status] = true if supports[:status].nil? + super if ::File.exists?("/sbin/chkconfig") |