[omd-commits] OMD Git: omd: notifications: map newlines before ascii extraction

git version control git at mathias-kettner.de
Mon Jul 2 14:36:32 CEST 2012


Module:   omd
Branch:   master
Commit:   939cbd6becec161e7b2fef1e274bc5519ecbf54a
URL:      http://omdistro.org/projects/omd/repository/revisions/939cbd6becec161e7b2fef1e274bc5519ecbf54a

Author:   Sven Nierlein <sven at consol.de>
Date:     Mon Jul  2 14:36:04 2012 +0200
Commiter: Sven Nierlein <sven at consol.de>
Date:     Mon Jul  2 14:36:04 2012 +0200

notifications: map newlines before ascii extraction

---

 packages/notifications-tt/notify-by-email.pl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/packages/notifications-tt/notify-by-email.pl b/packages/notifications-tt/notify-by-email.pl
index d98f72e..b52273b 100755
--- a/packages/notifications-tt/notify-by-email.pl
+++ b/packages/notifications-tt/notify-by-email.pl
@@ -34,6 +34,7 @@ if ( ! -e $template ){
 	exit 3;
 }
 
+map($macro{$_} =~ s/\\n/\n/gmx, keys %macro);
 extract_ascii($macro{'LONGHOSTOUTPUT'});
 extract_ascii($macro{'LONGSERVICEOUTPUT'});
 process_template();
@@ -47,7 +48,6 @@ sub process_template {
 		$data .= "$_";
 	}
 	close FILE;
-	map($macro{$_} =~ s/\\n/\n/gmx, keys %macro);
 	my $template = Template->new({PRE_CHOMP => 1, POST_CHOMP => 0});
 	$template->process(\$data, \%macro, \$output);
 	print $output if $verbose;



More information about the omd-commits mailing list