diff options
author | Kurt Jaeger <pi@FreeBSD.org> | 2014-10-23 17:48:35 +0000 |
---|---|---|
committer | Kurt Jaeger <pi@FreeBSD.org> | 2014-10-23 17:48:35 +0000 |
commit | 8c87610bf5d79486230abec3f97b61affc27b563 (patch) | |
tree | c13bfc530c04a395311943234feda94abdf8cec8 /sysutils/backuppc-devel/files/patch-bin-BackupPC_rrdUpdate | |
parent | fix conflicts with mail/courier-imap (diff) |
New port: sysutils/backuppc-devel
BackupPC is a high-performance, enterprise-grade system for backing up
Linux, WinXX and MacOSX PCs and laptops to a server's disk.
BackupPC is highly configurable and easy to install and maintain.
WWW: http://backuppc.sourceforge.net
This is Version 4.0.0alpha3, please use with caution. On the other
hand, it is 10 month old, and the submitter is also the maintainer of
sysutils/backuppc.
PR: 183241
Submitted by: Alexander Moisseev <moiseev@mezonplus.ru>
Diffstat (limited to 'sysutils/backuppc-devel/files/patch-bin-BackupPC_rrdUpdate')
-rw-r--r-- | sysutils/backuppc-devel/files/patch-bin-BackupPC_rrdUpdate | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/sysutils/backuppc-devel/files/patch-bin-BackupPC_rrdUpdate b/sysutils/backuppc-devel/files/patch-bin-BackupPC_rrdUpdate new file mode 100644 index 000000000000..3289e88e4f3a --- /dev/null +++ b/sysutils/backuppc-devel/files/patch-bin-BackupPC_rrdUpdate @@ -0,0 +1,57 @@ +--- ./bin/BackupPC_rrdUpdate.orig 2013-12-09 17:06:45.000000000 +0400 ++++ ./bin/BackupPC_rrdUpdate 2013-12-10 12:24:41.000000000 +0400 +@@ -109,7 +109,7 @@ + } + $sizeTot = $sizeTot / 1024; + +- print $bpc->cmdSystemOrEval( ++ if ( $err = $bpc->cmdSystemOrEval( + [ + $Conf{RrdToolPath}, + "update", $RRDFile, +@@ -119,13 +119,17 @@ + . $Info{"poolKb"} . ":" + . $Info{"pool4Kb"} . ":" + . $Info{"cpool4Kb"} +- ]); +- printf("%sRRD updated:" ++ ]) ) { ++ print "$err"; ++ } ++ else { ++ printf("%sRRD updated:" + . " date %s; cpoolKb %f; total %f;" + . " poolKb %f; pool4Kb %f; cpool4Kb %f\n", + $bpc->timeStamp, + $NowRnd1, $Info{"cpoolKb"}, $sizeTot, + $Info{"poolKb"}, $Info{"pool4Kb"}, $Info{"cpool4Kb"}); ++ } + } + + # +@@ -140,7 +144,7 @@ + # + # Get each pool max value from RRD + # +- $bpc->cmdSystemOrEval( ++ $bpc->cmdSystemOrEvalLong( + [ + $Conf{RrdToolPath}, + "graphv", "-", +@@ -158,7 +162,7 @@ + if ( $_[0] =~ /^print\[([0-3])\] = "([.0-9]+)"$/ ) { + $poolMax[$1] = $2 unless ( $2 == 0 ); + } +- }); ++ }, 1, undef); + + my $poolSizeGraph = [ + "$Conf{RrdToolPath}", +@@ -228,6 +232,6 @@ + print("Can't open/create $LogDir/poolUsage$weeks.png\n"); + return; + } +- $bpc->cmdSystemOrEval($poolSizeGraph, sub { print $fdOut $_[0] }); ++ $bpc->cmdSystemOrEvalLong($poolSizeGraph, sub { print $fdOut $_[0] }, 1, undef); + close($fdOut); + } |