summaryrefslogtreecommitdiff
path: root/lib/chef/resource/service.rb
diff options
context:
space:
mode:
authormarkgibbons <mark.gibbons@nordstrom.com>2017-02-06 15:05:46 -0800
committermarkgibbons <mark.gibbons@nordstrom.com>2017-02-17 11:42:33 -0800
commit2c63d86ffc1f1334216d401af364d5acffdf2c09 (patch)
tree4e48490b5b2404185a0810bf4fcd7a09594aeb3c /lib/chef/resource/service.rb
parent87e4d14ccb06053cf2837f5df1f629ae37f6e956 (diff)
downloadchef-2c63d86ffc1f1334216d401af364d5acffdf2c09.tar.gz
smf_recursive_dependencies: Separate the svcadm options passed to shell_out.
Signed-off-by: markgibbons <mark.gibbons@nordstrom.com>
Diffstat (limited to 'lib/chef/resource/service.rb')
-rw-r--r--lib/chef/resource/service.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/chef/resource/service.rb b/lib/chef/resource/service.rb
index 460af74acd..5282b892c0 100644
--- a/lib/chef/resource/service.rb
+++ b/lib/chef/resource/service.rb
@@ -36,6 +36,7 @@ class Chef
@enabled = nil
@running = nil
@masked = nil
+ @options = nil
@parameters = nil
@pattern = service_name
@start_command = nil
@@ -49,7 +50,6 @@ class Chef
@run_levels = nil
@user = nil
@supports = { :restart => nil, :reload => nil, :status => nil }
- @recursive = nil
end
def service_name(arg = nil)
@@ -153,6 +153,14 @@ class Chef
)
end
+ def options(arg = nil)
+ set_or_return(
+ :options,
+ arg.respond_to?(:split) ? arg.split(/\s+/) : arg,
+ :kind_of => [ Array, String ]
+ )
+ end
+
# Priority arguments can have two forms:
#
# - a simple number, in which the default start runlevels get
@@ -213,14 +221,6 @@ class Chef
end
end
- def options(arg = nil)
- set_or_return(
- :options,
- arg,
- :kind_of => [ Array, String ]
- )
- end
-
end
end
end