From fc33bf5fbd2d8a8bc3daa3df1122f4348deb65f0 Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Thu, 9 Jul 2015 09:13:17 -0700 Subject: remove use of self.provides? the block to provides can handle this case --- lib/chef/provider/service/redhat.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'lib/chef/provider/service/redhat.rb') 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 -- cgit v1.2.1