diff options
Diffstat (limited to 'lib/chef/provider/service/redhat.rb')
-rw-r--r-- | lib/chef/provider/service/redhat.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/chef/provider/service/redhat.rb b/lib/chef/provider/service/redhat.rb index 90744ae268..850953125e 100644 --- a/lib/chef/provider/service/redhat.rb +++ b/lib/chef/provider/service/redhat.rb @@ -28,8 +28,12 @@ class Chef provides :service, platform_family: [ "rhel", "fedora", "suse" ] + def self.provides?(node, resource) + super && Chef::Platform::ServiceHelpers.service_resource_providers.include?(:redhat) + end + def self.supports?(resource, action) - Chef::Platform::ServiceHelpers.service_resource_providers.include?(:redhat) + Chef::Platform::ServiceHelpers.config_for_service(resource.service_name).include?(:initd) end def initialize(new_resource, run_context) |