summaryrefslogtreecommitdiff
path: root/lib/chef/provider/service.rb
diff options
context:
space:
mode:
authorSeth Chisamore <schisamo@opscode.com>2012-11-13 14:05:57 -0500
committerSeth Chisamore <schisamo@opscode.com>2012-11-13 17:27:31 -0500
commit6317bf5f07f70b8ec70ad254a5b8b3aca9b6bbe7 (patch)
treec6c5f52d1a46e9dc0c0ea4846bb030db6a59c4eb /lib/chef/provider/service.rb
parentea28e343db64d9dbee57707e81e19342c2493365 (diff)
downloadchef-6317bf5f07f70b8ec70ad254a5b8b3aca9b6bbe7.tar.gz
[CHEF-3603] add init_command attribute to service resource
Diffstat (limited to 'lib/chef/provider/service.rb')
-rw-r--r--lib/chef/provider/service.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/chef/provider/service.rb b/lib/chef/provider/service.rb
index decca7fd7c..27af1ac970 100644
--- a/lib/chef/provider/service.rb
+++ b/lib/chef/provider/service.rb
@@ -153,6 +153,16 @@ class Chef
raise Chef::Exceptions::UnsupportedAction, "#{self.to_s} does not support :restart"
end
+ protected
+
+ def default_init_command
+ if @new_resource.init_command
+ @new_resource.init_command
+ elsif self.instance_variable_defined?(:@init_command)
+ @init_command
+ end
+ end
+
end
end
end