diff options
author | Serdar Sutay <serdar@opscode.com> | 2014-10-24 13:39:03 -0700 |
---|---|---|
committer | Serdar Sutay <serdar@opscode.com> | 2014-10-24 13:39:03 -0700 |
commit | 5f8f8095b11bb41d7f199f12ee3e044525d434de (patch) | |
tree | 7441b1427ae422f2760d66fd96a1ec8f01764ffa | |
parent | 8a3da2f3d77b5cd2e3b3952e257706af5f463244 (diff) | |
parent | 8c99535067797411a8e6714ce2379140af8142ae (diff) | |
download | chef-5f8f8095b11bb41d7f199f12ee3e044525d434de.tar.gz |
Merge pull request #2270 from liseki/fix-whiny-freebsd-service
Ensure why-run of a FreeBSD service missing init script does not fail
-rw-r--r-- | lib/chef/provider/service/freebsd.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/provider/service/freebsd.rb b/lib/chef/provider/service/freebsd.rb index e4a456ac25..94f883b35e 100644 --- a/lib/chef/provider/service/freebsd.rb +++ b/lib/chef/provider/service/freebsd.rb @@ -62,6 +62,7 @@ class Chef requirements.assert(:start, :enable, :reload, :restart) do |a| a.assertion { init_command } a.failure_message Chef::Exceptions::Service, "#{new_resource}: unable to locate the rc.d script" + a.whyrun("Assuming rc.d script will be installed by a previous action.") end requirements.assert(:all_actions) do |a| @@ -72,7 +73,7 @@ class Chef end requirements.assert(:start, :enable, :reload, :restart) do |a| - a.assertion { init_command && service_enable_variable_name != nil } + a.assertion { service_enable_variable_name != nil } a.failure_message Chef::Exceptions::Service, "Could not find the service name in #{init_command} and rcvar" # No recovery in whyrun mode - the init file is present but not correct. end |