diff options
| author | Lamont Granquist <lamont@scriptkiddie.org> | 2018-01-23 12:11:01 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-01-23 12:11:01 -0800 |
| commit | 9f78fdbdbdf43659ce2c13f2838e7db2178c5726 (patch) | |
| tree | f94decb6f0e62000309b4461dcf742f220731304 /lib/chef/application/client.rb | |
| parent | a7202f77460729090f95e4ff995f4ab1c0898bba (diff) | |
| download | chef-9f78fdbdbdf43659ce2c13f2838e7db2178c5726.tar.gz | |
Revert "Fail on interval runs on windows"
Diffstat (limited to 'lib/chef/application/client.rb')
| -rw-r--r-- | lib/chef/application/client.rb | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/lib/chef/application/client.rb b/lib/chef/application/client.rb index f839ef25df..32530925d5 100644 --- a/lib/chef/application/client.rb +++ b/lib/chef/application/client.rb @@ -2,7 +2,7 @@ # Author:: AJ Christensen (<aj@chef.io) # Author:: Christopher Brown (<cb@chef.io>) # Author:: Mark Mzyk (mmzyk@chef.io) -# Copyright:: Copyright 2008-2018, Chef Software Inc. +# Copyright:: Copyright 2008-2016, Chef Software, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -360,12 +360,8 @@ class Chef::Application::Client < Chef::Application Chef::Config[:splay] = nil end - if Chef::Config[:interval] - if Chef::Platform.windows? - Chef::Application.fatal!(windows_interval_error_message) - elsif !Chef::Config[:client_fork] - Chef::Application.fatal!(unforked_interval_error_message) - end + if !Chef::Config[:client_fork] && Chef::Config[:interval] && !Chef::Platform.windows? + Chef::Application.fatal!(unforked_interval_error_message) end if Chef::Config[:json_attribs] @@ -512,13 +508,6 @@ class Chef::Application::Client < Chef::Application end end - def windows_interval_error_message - "Windows chef-client interval runs are disabled in Chef 14." + - "\nConfiguration settings:" + - "#{"\n interval = #{Chef::Config[:interval]} seconds" if Chef::Config[:interval]}" + - "\nPlease install chef-client as a Windows service or scheduled task instead." - end - def unforked_interval_error_message "Unforked chef-client interval runs are disabled in Chef 12." + "\nConfiguration settings:" + |
