+++ /dev/null
-
-##########################################################################
-# $Id: dialup $
-##########################################################################
-
-use Logwatch ':all';
-
-$Debug = ValueOrDefault($ENV{'LOGWATCH_DEBUG'}, 0);
-$Detail = ValueOrDefault($ENV{'LOGWATCH_DETAIL_LEVEL'}, 0);
-
-# Avoid "Use of uninitialized value" warning messages.
-sub ValueOrDefault {
- my ($value, $default) = @_;
- return ($value ? $value : $default);
-}
-
-if ( $Debug >= 5 ) {
- print STDERR "\n\nDEBUG: Inside DIALUP Filter \n\n";
- $DebugCounter = 1;
-}
-
-while (defined($ThisLine = <STDIN>)) {
- if ( $Debug >= 5 ) {
- print STDERR "DEBUG($DebugCounter): $ThisLine";
- $DebugCounter++;
- }
- chomp($ThisLine);
-
- if ( $ThisLine =~ /^pppd (\d+).(\d+).(\d+) started by root, uid (\d+)/ )
- {
- if ($Debug >= 5)
- {
- print STDERR "DEBUG: Found PPP start\n";
- }
- $Starts++
- }
- elsif ( $ThisLine =~ /^Connection terminated./ )
- {
- if ($Debug >= 5)
- {
- print STDERR "DEBUG: Found PPP down\n";
- }
- $Downs++
- }
- elsif ( $ThisLine =~ /^PPP session is (\d+)/ )
- {
- if ($Debug >= 5)
- {
- print STDERR "DEBUG: Found PPP connect\n";
- }
- $Ups++
- }
- elsif ( $ThisLine =~ /^Connect time (\d+).(\d+) minutes./ )
- {
- if ($Debug >= 5)
- {
- print STDERR "DEBUG: Found PPP connecttime $1\n";
- }
- $Uptime += $1 + ($2 / 10);
- }
-}
-
-###########################################################
-
-if ( $Starts )
-{
- print "PPP Dial attempts: " . $Starts . " Time(s)\n";
-}
-
-if ( $Ups )
-{
- print "PPP Connected: " . $Ups . " Time(s)\n";
-}
-
-if ( $Downs )
-{
- print "PPP Disconnected: " . $Downs . " Time(s)\n";
-}
-
-if ( $Uptime )
-{
- print "Total connect time: " . $Uptime . " Minutes\n";
-}
-
-exit(0);
-
-# vi: shiftwidth=3 tabstop=3 syntax=perl et
+++ /dev/null
-###########################################################################
-#
-###########################################################################
-
-# You can put comments anywhere you want to. They are effective for the
-# rest of the line.
-
-# this is in the format of <name> = <value>. Whitespace at the beginning
-# and end of the lines is removed. Whitespace before and after the = sign
-# is removed. Everything is case *insensitive*.
-
-# Yes = True = On = 1
-# No = False = Off = 0
-
-Title = "Dialup"
-
-# Which logfile group...
-LogFile = messages
-
-# Only give lines pertaining to the ppp service...
-*OnlyService = pppd
-*RemoveHeaders
-
-# vi: shiftwidth=3 tabstop=3 et