View Issue Details

IDProjectCategoryView StatusLast Update
0005002CentOS-6baculapublic2011-10-28 13:17
Reporterxexyl 
PrioritynormalSeverityblockReproducibilityalways
Status newResolutionopen 
Product Version6.0 
Target VersionFixed in Version 
Summary0005002: missing logwatch applybaculadate script
DescriptionExactly as the summary says: applybaculadate script is missing for logwatch. However, the file /etc/logwatch/conf/services/bacula.conf specifies to use it. Therefore, logwatch bails out and doesn't send a mail or (assume) print out (if logwatch setting is for printing to stderr).

Additional InformationI'm attaching the same script I mention that is in bacula-director-common in Fedora 15's release. I tested it on CentOS 6 and it seems to work fine. It goes here: /etc/logwatch/scripts/shared/applybaculadate

I put the serverity at block as it prevents logwatch from completing when bacula is installed. Apologies if this is not the best level.
TagsNo tags attached.

Activities

2011-07-24 15:22

 

applybaculadate (1,428 bytes)
#!/usr/bin/perl

########################################################################
## Copyright (c) 2009 Sigma Consulting Services Limited
## v1.00 2009/06/21 16:54:23 Ian McMichael
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 2 of the License, or
## any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program.  If not, see <http://www.gnu.org/licenses/>.
########################################################################

use Logwatch ':dates';

my $Debug = $ENV{'LOGWATCH_DEBUG'} || 0;

$SearchDate = TimeFilter('%d-%b %H:%M');

if ( $Debug > 5 ) {
   print STDERR "DEBUG: Inside ApplyBaculaDate...\n";
   print STDERR "DEBUG: Looking For: " . $SearchDate . "\n";
}

my $OutputLine = 0;

while (defined($ThisLine = <STDIN>)) {
   if ($ThisLine =~ m/^$SearchDate /o) {
      $OutputLine = 1;
   } elsif ($ThisLine !~ m/^\s+/o) {
      $OutputLine = 0;
   }

   if ($OutputLine) {
      print $ThisLine;
   }
}

# vi: shiftwidth=3 syntax=perl tabstop=3 et
applybaculadate (1,428 bytes)
range

range

2011-07-25 09:15

administrator   ~0013041

https://bugzilla.redhat.com/show_bug.cgi?id=651776 is the upstream bug report for this. It will get fixed in CentOS, once it is fixed in RHEL 6.
amarand

amarand

2011-10-28 13:17

reporter   ~0013651

On that bug, there is now a quick workaround listed (tested):

https://bugzilla.redhat.com/show_bug.cgi?id=651776

Robert Scheck 2011-08-05 07:38:18 EDT Comment 21

Issue History

Date Modified Username Field Change
2011-07-24 15:22 xexyl New Issue
2011-07-24 15:22 xexyl File Added: applybaculadate
2011-07-25 09:15 range Note Added: 0013041
2011-10-28 13:17 amarand Note Added: 0013651