diff options
author | Noah Kantrowitz <noah@coderanger.net> | 2016-03-14 15:56:51 -0700 |
---|---|---|
committer | Noah Kantrowitz <noah@coderanger.net> | 2016-03-14 15:56:51 -0700 |
commit | 84ee78a74a6873ff1fce2090736413b8fb155ddf (patch) | |
tree | 07ca9d2fad656a1c06bf34a48458138006233bb8 /lib/chef/provider/service | |
parent | 3f07943715c31dd328dd104bba90d103b744323b (diff) | |
download | chef-84ee78a74a6873ff1fce2090736413b8fb155ddf.tar.gz |
Setting init_command should be accepted instead of specific command overrides.
Also remove :enable from that list because enable_command isn't a thing on the service resource.
Diffstat (limited to 'lib/chef/provider/service')
-rw-r--r-- | lib/chef/provider/service/redhat.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/provider/service/redhat.rb b/lib/chef/provider/service/redhat.rb index a76622ee8f..2eda4748e3 100644 --- a/lib/chef/provider/service/redhat.rb +++ b/lib/chef/provider/service/redhat.rb @@ -60,9 +60,9 @@ class Chef a.failure_message Chef::Exceptions::Service, "#{chkconfig_file} dbleoes not exist!" end - requirements.assert(:start, :enable, :reload, :restart) do |a| + requirements.assert(:start, :reload, :restart) do |a| a.assertion do - custom_command_for_action?(action) || !@service_missing + new_resource.init_command || custom_command_for_action?(action) || !@service_missing end a.failure_message Chef::Exceptions::Service, "#{new_resource}: No custom command for #{action} specified and unable to locate the init.d script!" a.whyrun "Assuming service would be disabled. The init script is not presently installed." |