[Logwatch-Devel] Patch to improve lame server handling in named service script
Sean Millichamp
sean@compu-aid.net
23 Sep 2002 14:00:38 -0400
--=-oEBtrUsP7WECsEeUVC5a
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Red Hat's bind-9.2.1-1.7x-2 RPM's lame server messages read "lame server
resolving" instead of "lame server on" and therefore don't get caught by
Logwatch 3.3. This is a patch so that it will catch both forms of the
message.
Already sent to logwatch-patches but thought it might be of interest to
the mailing list.
Sean
--=-oEBtrUsP7WECsEeUVC5a
Content-Disposition: attachment; filename=logwatch-named-lameserver.patch
Content-Transfer-Encoding: quoted-printable
Content-Type: text/x-patch; name=logwatch-named-lameserver.patch; charset=ISO-8859-1
diff -cr logwatch-3.3-orig/scripts/services/named logwatch-3.3/scripts/serv=
ices/named
*** logwatch-3.3-orig/scripts/services/named Tue Apr 30 09:56:41 2002
--- logwatch-3.3/scripts/services/named Mon Sep 23 12:23:52 2002
***************
*** 187,194 ****
elsif ( ($Zone) =3D ( $ThisLine =3D~ /slave zone \"(.+)\" .* loaded/ =
) ) {
$ZoneLoaded{"secondary $Zone"}++;
}
! elsif ( ($Addr,undef,$Server) =3D ( $ThisLine =3D~ /ame server on '(.=
+)' \(in .+\):\s+(\[.+\]\.\d+)?\s*'?(.+)'?:?/ ) ) {
! $LameServer{"$Addr ($Server)"}++;
}
elsif ( ($Zone) =3D ( $ThisLine =3D~ /Zone \"(.+)\" was removed/ ) ) =
{
$ZoneRemoved{$Zone}++;
--- 187,194 ----
elsif ( ($Zone) =3D ( $ThisLine =3D~ /slave zone \"(.+)\" .* loaded/ =
) ) {
$ZoneLoaded{"secondary $Zone"}++;
}
! elsif ( (undef,$Addr,undef,$Server) =3D ( $ThisLine =3D~ /ame server =
(on|resolving) '(.+)' \(in .+\):\s+(\[.+\]\.\d+)?\s*'?(.+)'?:?/ ) ) {
! $LameServer{"$Addr ($Server)"}++;
}
elsif ( ($Zone) =3D ( $ThisLine =3D~ /Zone \"(.+)\" was removed/ ) ) =
{
$ZoneRemoved{$Zone}++;
--=-oEBtrUsP7WECsEeUVC5a--