summaryrefslogtreecommitdiff
path: root/lib/chef/provider/service/upstart.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2014-11-04 14:48:15 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2014-11-08 11:26:07 -0800
commit4aba8b23a6248e34aca75436ad142836fe2d4c82 (patch)
tree0985fdd976c03cf9f1e644d918b3c96f32c1c9f4 /lib/chef/provider/service/upstart.rb
parent74889fe64a8a71c48fb1d0ffa124f3d28fb9695c (diff)
downloadchef-4aba8b23a6248e34aca75436ad142836fe2d4c82.tar.gz
polishing provider_resolver
* makes provides? more correct for linux services * makes supports? more targetted for linux services * remove provider_resolver from the run_context * fix timestamped deploy spec * add more specs
Diffstat (limited to 'lib/chef/provider/service/upstart.rb')
-rw-r--r--lib/chef/provider/service/upstart.rb7
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.