diff options
Diffstat (limited to 'lib/chef/provider/service/upstart.rb')
-rw-r--r-- | lib/chef/provider/service/upstart.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/chef/provider/service/upstart.rb b/lib/chef/provider/service/upstart.rb index 41bd850d6a..3a3ddb2385 100644 --- a/lib/chef/provider/service/upstart.rb +++ b/lib/chef/provider/service/upstart.rb @@ -29,9 +29,12 @@ class Chef provides :service, os: "linux" + def self.provides?(node, resource) + super && Chef::Platform::ServiceHelpers.service_resource_providers.include?(:upstart) + end + def self.supports?(resource, action) - Chef::Platform::ServiceHelpers.service_resource_providers.include?(:upstart) && - Chef::Platform::ServiceHelpers.config_for_service(resource.service_name).include?(:upstart) + Chef::Platform::ServiceHelpers.config_for_service(resource.service_name).include?(:upstart) end # Upstart does more than start or stop a service, creating multiple 'states' [1] that a service can be in. |