From 1245ad1e4971b7bd16ae8af4a4370388962d8b52 Mon Sep 17 00:00:00 2001 From: miwi Date: Tue, 24 Apr 2007 09:20:53 +0000 Subject: - Fix build PR: 112025 Submitted by: Denis Shaposhnikov (maintainer) --- net-mgmt/nagiosgraph/Makefile | 2 +- net-mgmt/nagiosgraph/files/patch-insert.pl | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 net-mgmt/nagiosgraph/files/patch-insert.pl (limited to 'net-mgmt') diff --git a/net-mgmt/nagiosgraph/Makefile b/net-mgmt/nagiosgraph/Makefile index 4eb1a15394a9..387b629947d6 100644 --- a/net-mgmt/nagiosgraph/Makefile +++ b/net-mgmt/nagiosgraph/Makefile @@ -7,7 +7,7 @@ PORTNAME= nagiosgraph PORTVERSION= 0.8.2 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net-mgmt MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} diff --git a/net-mgmt/nagiosgraph/files/patch-insert.pl b/net-mgmt/nagiosgraph/files/patch-insert.pl new file mode 100644 index 000000000000..252d0e4f0d0a --- /dev/null +++ b/net-mgmt/nagiosgraph/files/patch-insert.pl @@ -0,0 +1,22 @@ +Index: insert.pl +=================================================================== +--- insert.pl (.../vendor/nagiosgraph/0.8.2/insert.pl) (revision 1211) ++++ insert.pl (.../trunk/src/nagiosgraph/insert.pl) (revision 1211) +@@ -148,9 +148,14 @@ + if ( $ARGV[0] ) { + @inputlines = $ARGV[0]; + } elsif ( defined $Config{perflog} ) { +- open PERFLOG, $Config{perflog}; +- @inputlines = ; +- close PERFLOG ++ if (-s $Config{perflog}) { ++ my $worklog = $Config{perflog} . ".nagiosgraph"; ++ rename($Config{perflog}, $worklog); ++ open PERFLOG, $worklog; ++ @inputlines = ; ++ close PERFLOG; ++ unlink($worklog); ++ } + } + + # Quit if there are no data to process -- cgit