summaryrefslogtreecommitdiff
path: root/lib/chef/resource/service.rb
diff options
context:
space:
mode:
authorRobby Dyer <rdyer@tropo.com>2014-06-17 14:53:46 -0400
committerLamont Granquist <lamont@scriptkiddie.org>2015-08-18 13:40:45 -0700
commitb5e9c70e43b8d37eee1fb9f5aaae391125c4cc22 (patch)
tree3d60b52c13c5ce007c00ba9cf3409beca15af1d7 /lib/chef/resource/service.rb
parent1bdf739b844489424283852af56f5a8f2b8f362a (diff)
downloadchef-b5e9c70e43b8d37eee1fb9f5aaae391125c4cc22.tar.gz
CHEF-5372: Support specific run_levels for RedHat service
Diffstat (limited to 'lib/chef/resource/service.rb')
-rw-r--r--lib/chef/resource/service.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/chef/resource/service.rb b/lib/chef/resource/service.rb
index aa59b543be..e65f1bf724 100644
--- a/lib/chef/resource/service.rb
+++ b/lib/chef/resource/service.rb
@@ -1,7 +1,7 @@
#
# Author:: AJ Christensen (<aj@hjksolutions.com>)
# Author:: Tyler Cloke (<tyler@opscode.com>)
-# Copyright:: Copyright (c) 2008 Opscode, Inc.
+# Copyright:: Copyright (c) 2008-2015 Chef Software, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -44,6 +44,8 @@ class Chef
@init_command = nil
@priority = nil
@timeout = nil
+ @run_levels = nil
+ @action = "nothing"
@supports = { :restart => false, :reload => false, :status => false }
end
@@ -174,6 +176,13 @@ class Chef
)
end
+ def run_levels(arg=nil)
+ set_or_return(
+ :run_levels,
+ arg,
+ :kind_of => [ Array ] )
+ end
+
def supports(args={})
if args.is_a? Array
args.each { |arg| @supports[arg] = true }