diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2015-07-09 09:13:17 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2015-08-18 11:59:20 -0700 |
commit | fc33bf5fbd2d8a8bc3daa3df1122f4348deb65f0 (patch) | |
tree | 6bcf185f40b797a590d6647941fd59cfad92ac85 /lib/chef/provider/service/redhat.rb | |
parent | 36ef6acfe162152631521b9916b4ca69773c9eb1 (diff) | |
download | chef-fc33bf5fbd2d8a8bc3daa3df1122f4348deb65f0.tar.gz |
remove use of self.provides?
the block to provides can handle this case
Diffstat (limited to 'lib/chef/provider/service/redhat.rb')
-rw-r--r-- | lib/chef/provider/service/redhat.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/chef/provider/service/redhat.rb b/lib/chef/provider/service/redhat.rb index 2330d88eb7..19cd2aa485 100644 --- a/lib/chef/provider/service/redhat.rb +++ b/lib/chef/provider/service/redhat.rb @@ -23,15 +23,13 @@ class Chef class Service class Redhat < Chef::Provider::Service::Init - provides :service, platform_family: %w(rhel fedora suse) + provides :service, platform_family: %w(rhel fedora suse) do |node| + Chef::Platform::ServiceHelpers.service_resource_providers.include?(:redhat) + end CHKCONFIG_ON = /\d:on/ CHKCONFIG_MISSING = /No such/ - def self.provides?(node, resource) - super && Chef::Platform::ServiceHelpers.service_resource_providers.include?(:redhat) - end - def self.supports?(resource, action) Chef::Platform::ServiceHelpers.config_for_service(resource.service_name).include?(:initd) end |