- fix removeservice script - to decrease the number of perl instances

running simultaneously
This commit is contained in:
Ivana Varekova 2009-06-15 09:15:06 +00:00
parent bc7f1c4f45
commit 77fd01c704
2 changed files with 60 additions and 1 deletions

View File

@ -0,0 +1,53 @@
diff -up logwatch-7.3.6/conf/logfiles/messages.conf.pom logwatch-7.3.6/conf/logfiles/messages.conf
--- logwatch-7.3.6/conf/logfiles/messages.conf.pom 2009-06-15 10:59:52.000000000 +0200
+++ logwatch-7.3.6/conf/logfiles/messages.conf 2009-06-15 11:03:48.000000000 +0200
@@ -25,13 +25,7 @@ Archive = archiv/messages-*
*ExpandRepeats
# Now, lets remove the services we don't care about at all...
-*RemoveService = talkd
-*RemoveService = telnetd
-*RemoveService = inetd
-*RemoveService = nfsd
-*RemoveService = /sbin/mingetty
-*RemoveService = netscreen
-*RemoveService = NetScreen
+*RemoveService = talkd,telnetd,inetd,nfsd,/sbin/mingetty,netscreen,NetScreen
# Keep only the lines in the proper date range...
*OnlyHost
diff -up logwatch-7.3.6/conf/logfiles/syslog.conf.pom logwatch-7.3.6/conf/logfiles/syslog.conf
--- logwatch-7.3.6/conf/logfiles/syslog.conf.pom 2009-06-15 10:59:52.000000000 +0200
+++ logwatch-7.3.6/conf/logfiles/syslog.conf 2009-06-15 11:04:23.000000000 +0200
@@ -16,11 +16,7 @@ LogFile = syslog.0
Archive = syslog.*.gz
Archive = syslog-*.gz
*ExpandRepeats
-*RemoveService = talkd
-*RemoveService = telnetd
-*RemoveService = inetd
-*RemoveService = nfsd
-*RemoveService = /sbin/mingetty
+*RemoveService = talkd,telnetd,inetd,nfsd,/sbin/mingetty
*OnlyHost
*ApplyStdDate
diff -up logwatch-7.3.6/scripts/shared/removeservice.pom logwatch-7.3.6/scripts/shared/removeservice
--- logwatch-7.3.6/scripts/shared/removeservice.pom 2005-02-24 18:08:05.000000000 +0100
+++ logwatch-7.3.6/scripts/shared/removeservice 2009-06-15 11:02:51.000000000 +0200
@@ -24,10 +24,13 @@ if ( $ENV{'LOGWATCH_DEBUG'} > 5 ) {
$ServiceName = $ARGV[0];
+#Change commas to pipes -mgt
+$ServiceName =~ s/,/|/g;
+
while (defined($ThisLine = <STDIN>)) {
$linesin++;
- unless ( ($ThisLine =~ m/^... .. ..:..:.. [^ ]* $ServiceName\[[0123456789]*\]: /oi) or
- ($ThisLine =~ m/^... .. ..:..:.. [^ ]* $ServiceName: /oi) ) {
+ unless ( ($ThisLine =~ m/^... .. ..:..:.. [^ ]* ($ServiceName)\[[0123456789]*\]: /oi) or
+ ($ThisLine =~ m/^... .. ..:..:.. [^ ]* (:\s*)?($ServiceName)\s*: /oi) ) {
$linesout++;
print $ThisLine;
}

View File

@ -1,7 +1,7 @@
Summary: A log file analysis program
Name: logwatch
Version: 7.3.6
Release: 42%{?dist}
Release: 43%{?dist}
License: MIT
Group: Applications/System
URL: http://www.logwatch.org/
@ -51,6 +51,7 @@ Patch51: logwatch-7.3.6-openvpn3.patch
Patch52: logwatch-7.3.6-smartd.patch
Patch53: logwatch-7.3.6-sshd2.patch
Patch54: logwatch-7.3.6-exim2.patch
Patch55: logwatch-7.3.6-removeservice.patch
Requires: textutils sh-utils grep mailx
Requires: perl(Date::Manip)
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -109,6 +110,7 @@ of the package on many systems.
%patch52 -p1
%patch53 -p1
%patch54 -p1
%patch55 -p1
rm -f scripts/services/*.orig
%build
@ -220,6 +222,10 @@ rm -rf %{buildroot}
%doc License project/CHANGES
%changelog
* Mon Jun 15 2009 Ivana Varekova <varekova@redhat.com> 7.3.6-43
- fix removeservice script - to decrease the number of
perl instances running simultaneously
* Tue Mar 31 2009 Ivana Varekova <varekova@redhat.com> 7.3.6-42
- fix exim script (#492269)