diff options
author | Seth Chisamore <schisamo@opscode.com> | 2012-11-13 14:05:57 -0500 |
---|---|---|
committer | Seth Chisamore <schisamo@opscode.com> | 2012-11-13 17:27:31 -0500 |
commit | 6317bf5f07f70b8ec70ad254a5b8b3aca9b6bbe7 (patch) | |
tree | c6c5f52d1a46e9dc0c0ea4846bb030db6a59c4eb /lib/chef/provider/service.rb | |
parent | ea28e343db64d9dbee57707e81e19342c2493365 (diff) | |
download | chef-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.rb | 10 |
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 |