summaryrefslogtreecommitdiff
path: root/lib/chef/resource/service.rb
diff options
context:
space:
mode:
authorMatt <code@deployable.org>2013-12-05 12:20:39 +0000
committerClaire McQuin <claire@getchef.com>2014-06-18 15:23:33 -0700
commitd950ec4bea3333e8739630c37156d6b9d06eccda (patch)
treed280e92372b4fb41642cedf5e957eedd1035553e /lib/chef/resource/service.rb
parentd8592902ae09980552f8dd57abe9ed9c76851445 (diff)
downloadchef-d950ec4bea3333e8739630c37156d6b9d06eccda.tar.gz
CHEF-4600 Add timeout for Chef::Provider::Service::Windows
Diffstat (limited to 'lib/chef/resource/service.rb')
-rw-r--r--lib/chef/resource/service.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/chef/resource/service.rb b/lib/chef/resource/service.rb
index c3d009bc55..a7f1aa3470 100644
--- a/lib/chef/resource/service.rb
+++ b/lib/chef/resource/service.rb
@@ -42,6 +42,7 @@ class Chef
@reload_command = nil
@init_command = nil
@priority = nil
+ @timeout = nil
@action = "nothing"
@supports = { :restart => false, :reload => false, :status => false }
@allowed_actions.push(:enable, :disable, :start, :stop, :restart, :reload)
@@ -155,6 +156,13 @@ class Chef
:kind_of => [ Integer, String, Hash ])
end
+ # timeout only applies to the windows service manager
+ def timeout(arg=nil)
+ set_or_return(:timeout,
+ arg,
+ :kind_of => Integer )
+ end
+
def parameters(arg=nil)
set_or_return(
:parameters,