summaryrefslogtreecommitdiff
path: root/lib/chef/resource
diff options
context:
space:
mode:
authorClaire McQuin <mcquin@users.noreply.github.com>2014-06-18 17:02:56 -0700
committerClaire McQuin <mcquin@users.noreply.github.com>2014-06-18 17:02:56 -0700
commit9c0fb4bede5c30a175b658bef34300539dc22f2c (patch)
tree45eeaa731fd2abc6b780bd876a23d9f1a9354af4 /lib/chef/resource
parentcbe69c74eada5957d409f5d47694bd961951226e (diff)
parent27bfcc144afb48b40ab04aaded05744cab456bbe (diff)
downloadchef-9c0fb4bede5c30a175b658bef34300539dc22f2c.tar.gz
Merge pull request #1483 from opscode/CHEF-4600
Chef 4600
Diffstat (limited to 'lib/chef/resource')
-rw-r--r--lib/chef/resource/service.rb21
1 files changed, 17 insertions, 4 deletions
diff --git a/lib/chef/resource/service.rb b/lib/chef/resource/service.rb
index 94eca259f0..4d64c3e3f4 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)
@@ -154,16 +155,28 @@ class Chef
# similar for other runlevels
#
def priority(arg=nil)
- set_or_return(:priority,
- arg,
- :kind_of => [ Integer, String, Hash ])
+ set_or_return(
+ :priority,
+ arg,
+ :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,
arg,
- :kind_of => [ Hash ] )
+ :kind_of => [ Hash ]
+ )
end
def supports(args={})