logwatch text output: final whitespace
Willi Mann <[email protected]>
| Newsgroups | gmane.comp.log.logwatch.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi! In the Debian BTS, we have a bug report [1] that logwatch doesn't work with the sendmail "compatible" mailer dma [2]. The problem is that sub output adds a whitespace to every output line at the end. A proposed fix is attached. Note that this also changes the first line of output to contain a space character, but a fix that really only removes the last space seems to be unneccessarily complex. WM [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=642398 [2] http://packages.debian.org/sid/dma ------------------------------------------------------------------------------ RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ Logwatch-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/logwatch-devel
logwatch.pl.diff
(text/x-patch, 403 B)
--- /root/logwatch 2011-11-04 19:46:24.000000000 +0100
+++ /usr/sbin/logwatch 2011-11-04 20:18:38.000000000 +0100
@@ -1530,7 +1530,7 @@
if ( $type eq "line" ) {
if ( $Config{'format'} eq "text" ) {
- $out_body{$index} .= "$text ";
+ $out_body{$index} .= " $text";
} elsif ( $Config{'format'} eq "html" ) {
#Covert spaces
$text =~ s/ / \ /go;