diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/event_loggers/windows_eventlog.rb | 20 | ||||
-rw-r--r-- | lib/chef/resource/windows_package.rb | 1 | ||||
-rw-r--r-- | lib/chef/resource/windows_service.rb | 1 |
3 files changed, 10 insertions, 12 deletions
diff --git a/lib/chef/event_loggers/windows_eventlog.rb b/lib/chef/event_loggers/windows_eventlog.rb index e3bbbfa1e6..b8d279594b 100644 --- a/lib/chef/event_loggers/windows_eventlog.rb +++ b/lib/chef/event_loggers/windows_eventlog.rb @@ -19,7 +19,7 @@ require 'chef/event_loggers/base' require 'chef/platform/query_helpers' -if Chef::Platform::windows? +if Chef::Platform::windows? and not Chef::Platform::windows_server_2003? [:INFINITE, :WAIT_FAILED, :FORMAT_MESSAGE_IGNORE_INSERTS, :ERROR_INSUFFICIENT_BUFFER].each do |c| # These are redefined in 'win32/eventlog' Windows::Constants.send(:remove_const, c) @@ -56,7 +56,7 @@ class Chef def run_start(version) @eventlog.report_event( - :event_type => EventLog::INFO_TYPE, + :event_type => EventLog::INFO_TYPE, :source => SOURCE, :event_id => RUN_START_EVENT_ID, :data => [version] @@ -66,7 +66,7 @@ class Chef def run_started(run_status) @run_status = run_status @eventlog.report_event( - :event_type => EventLog::INFO_TYPE, + :event_type => EventLog::INFO_TYPE, :source => SOURCE, :event_id => RUN_STARTED_EVENT_ID, :data => [run_status.run_id] @@ -75,7 +75,7 @@ class Chef def run_completed(node) @eventlog.report_event( - :event_type => EventLog::INFO_TYPE, + :event_type => EventLog::INFO_TYPE, :source => SOURCE, :event_id => RUN_COMPLETED_EVENT_ID, :data => [@run_status.run_id, @run_status.elapsed_time.to_s] @@ -88,13 +88,13 @@ class Chef #Exception backtrace: %5 def run_failed(e) @eventlog.report_event( - :event_type => EventLog::ERROR_TYPE, - :source => SOURCE, + :event_type => EventLog::ERROR_TYPE, + :source => SOURCE, :event_id => RUN_FAILED_EVENT_ID, - :data => [@run_status.run_id, - @run_status.elapsed_time.to_s, - e.class.name, - e.message, + :data => [@run_status.run_id, + @run_status.elapsed_time.to_s, + e.class.name, + e.message, e.backtrace.join("\n")] ) end diff --git a/lib/chef/resource/windows_package.rb b/lib/chef/resource/windows_package.rb index b1ef2c288e..c1d49f2178 100644 --- a/lib/chef/resource/windows_package.rb +++ b/lib/chef/resource/windows_package.rb @@ -30,7 +30,6 @@ class Chef def initialize(name, run_context=nil) super @allowed_actions = [ :install, :remove ] - @resource_name = :windows_package @source ||= source(@package_name) # Unique to this resource diff --git a/lib/chef/resource/windows_service.rb b/lib/chef/resource/windows_service.rb index 2aec4d6304..e5179981c6 100644 --- a/lib/chef/resource/windows_service.rb +++ b/lib/chef/resource/windows_service.rb @@ -34,7 +34,6 @@ class Chef def initialize(name, run_context=nil) super - @resource_name = :windows_service @allowed_actions.push(:configure_startup) @startup_type = :automatic end |