From: Greg Sabino Mullane Date: Tue, 21 Jun 2011 11:25:00 +0000 (-0400) Subject: Should be warning, not printing, here. X-Git-Tag: 2.18.0~51 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=0e83421ac4dac20375784e9e2f7df22cb3fa57e0;p=check_postgres.git Should be warning, not printing, here. --- diff --git a/check_postgres.pl b/check_postgres.pl index 403e7eefa..de2cc694d 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -814,7 +814,7 @@ while (my $arg = pop @ARGV) { if (@badargs) { warn "Invalid arguments:\n"; for (@badargs) { - print " $_\n"; + warn " $_\n"; } die $USAGE; } @@ -1175,6 +1175,7 @@ sub add_response { $db->{perf} =~ s/^ +//; $perf .= sprintf '%s%s', length($perf) ? ' ' : '', $db->{perf}; } + ## Strip trailing semicolons as allowed by the Nagios spec $perf =~ s/; / /; $perf =~ s/;$//;