diff options
author | rafan <rafan@FreeBSD.org> | 2006-07-10 22:58:27 +0800 |
---|---|---|
committer | rafan <rafan@FreeBSD.org> | 2006-07-10 22:58:27 +0800 |
commit | d3cad9cc59c5dba76a4e69053f49516bf203b549 (patch) | |
tree | 49ed90c4c260e19378db649bea1ab36ca68e7d4e | |
parent | 0e0c3aa088470cfdcd945f54abbbb25a1c5940be (diff) | |
download | freebsd-ports-graphics-d3cad9cc59c5dba76a4e69053f49516bf203b549.tar.gz freebsd-ports-graphics-d3cad9cc59c5dba76a4e69053f49516bf203b549.tar.zst freebsd-ports-graphics-d3cad9cc59c5dba76a4e69053f49516bf203b549.zip |
- Fix syntax error
PR: 99886 [1], 97297
Submitted by: Oleg Gawriloff <barzog at telecom.by> [1]
Approved by: maintainer
-rw-r--r-- | security/amavis-stats/Makefile | 1 | ||||
-rw-r--r-- | security/amavis-stats/files/patch-amavis-stats | 79 |
2 files changed, 77 insertions, 3 deletions
diff --git a/security/amavis-stats/Makefile b/security/amavis-stats/Makefile index f27ce9ef799..dd64a2eb652 100644 --- a/security/amavis-stats/Makefile +++ b/security/amavis-stats/Makefile @@ -7,6 +7,7 @@ PORTNAME= amavis-stats PORTVERSION= 0.1.12 +PORTREVISION= 1 CATEGORIES= security MASTER_SITES= http://rekudos.net/download/ diff --git a/security/amavis-stats/files/patch-amavis-stats b/security/amavis-stats/files/patch-amavis-stats index 57bd5436bda..486550ad55f 100644 --- a/security/amavis-stats/files/patch-amavis-stats +++ b/security/amavis-stats/files/patch-amavis-stats @@ -1,6 +1,20 @@ ---- amavis-stats.orig Sat Mar 27 17:25:27 2004 -+++ amavis-stats Sun Jun 6 01:15:27 2004 -@@ -83,8 +83,8 @@ +--- amavis-stats.orig Sat Mar 27 23:25:27 2004 ++++ amavis-stats Mon Jul 10 22:55:19 2006 +@@ -1,4 +1,4 @@ +-#! /usr/bin/perl ++#!/usr/bin/perl -w + # + # amavis-stats -- generate rrds from amavis log output + # +@@ -28,6 +28,7 @@ + # ######################################################################## + use strict; + use warnings; ++use diagnostics; + use Getopt::Std; + use Time::localtime; + use Time::Local; +@@ -83,8 +84,8 @@ $version = "0.1.12"; # this value is auto-updated by packing system $pkg = "amavis-stats"; $locale = "C"; @@ -11,3 +25,62 @@ $statefile = "$statedir/$pkg.state"; # last read position of the logfile $namesfile = "$statedir/$pkg.names"; # stores the virus name to id mappings $countfile = "$statedir/$pkg.count"; # per virus totals +@@ -212,7 +213,7 @@ + sub semlock { + open (LOCKF, ">$lockfile") or do_exit(1, "Could not open $lockfile: $!"); + unless (flock(LOCKF, LOCK_EX | LOCK_NB)) { +- err("warning: Could not lock $lockfile: $!"); ++ print_err("warning: Could not lock $lockfile: $!"); + sleep 2; + unless (flock(LOCKF, LOCK_EX | LOCK_NB)) { + do_exit(1, "Could not lock $lockfile: $!"); +@@ -680,8 +681,8 @@ + if (defined($rotlogfile)) { + parseFile ($rotlogfile, $spos, (stat $rotlogfile)[7]); + } else { +- err("Could not open rotated logfile."); +- err(" Tried extentions .0, .1, .01, -$today, -$yesterday"); ++ print_err("Could not open rotated logfile."); ++ print_err(" Tried extentions .0, .1, .01, -$today, -$yesterday"); + do_exit(1); + } + } +@@ -707,7 +708,7 @@ + + my $err = RRDs::error; + if ($err) { +- err("createRRD: $err"); ++ print_err("createRRD: $err"); + return -1; + } + +@@ -736,7 +737,7 @@ + $last = RRDs::last($rrdfile); + $err = RRDs::error; + if ($err) { +- err("updateRRD: $err"); ++ print_err("updateRRD: $err"); + return -1; + } + +@@ -750,8 +751,8 @@ + + $err = RRDs::error; + if ($err) { +- err("updateRRD: $err"); +- err("Attempted to update $rrdfile at $epoch count $count"); ++ print_err("updateRRD: $err"); ++ print_err("Attempted to update $rrdfile at $epoch count $count"); + return -1; + } + } +@@ -769,7 +770,8 @@ + print "$me: @_\n" if ($verbose); + } + +-sub err { ++sub print_err ++{ + print STDERR "$me: error: @_\n"; + } + |