Skip to content
Snippets Groups Projects
Commit b29ea64d authored by Christopher Huhn's avatar Christopher Huhn
Browse files

Add new patch for Buster interoperability and reorder patches

parent d0d0e9b7
No related branches found
Tags v0.1.2
No related merge requests found
From: Christopher Huhn <C.Huhn@gsi.de>
Date: Tue, 9 Nov 2021 18:42:28 +0100
Subject: options is an instance variable, not local
---
lib/chef/handler/mail.rb | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/lib/chef/handler/mail.rb b/lib/chef/handler/mail.rb
index 3be01cc..9497f83 100644
--- a/lib/chef/handler/mail.rb
+++ b/lib/chef/handler/mail.rb
@@ -37,12 +37,12 @@ class MailHandler < Chef::Handler
Socket.gethostname
)
- Chef::Log.debug("mail handler template path: #{options[:template_path]}")
- if File.exists? options[:template_path]
- template = IO.read(options[:template_path]).chomp
+ Chef::Log.debug("mail handler template path: #{@options[:template_path]}")
+ if File.exists? @options[:template_path]
+ template = IO.read(@options[:template_path]).chomp
else
Chef::Log.error("mail handler template not found: " +
- options[:template_path])
+ @options[:template_path])
raise Errno::ENOENT
end
@@ -54,12 +54,9 @@ class MailHandler < Chef::Handler
bodystr = Erubis::Eruby.new(template).evaluate(context)
- to_address = options[:to_address]
- from_address = "chef-client@#{Socket.gethostname}"
-
mail = Mail.new do
- from options[:from_address]
- to to_address
+ from @options[:from_address]
+ to @options[:to_address]
subject subjectstr
body bodystr
end
0001-get-rid-of-pony-dependency.patch
0002-add-more-information-and-refactor-format.patch
0001-No-require-rubygems.patch
0003-No-require-rubygems.patch
0004-Use-Socket.gethostname-for-hostname-information.patch
0005-options-is-an-instance-variable-not-local.patch
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment