From dc38e55ff46ce391da42ddccfa6bacc2a89dd920 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Wed, 16 Jul 2008 18:19:42 -0400 Subject: [PATCH] Fix version action: only output mrtg if in that mode. --- check_postgres.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/check_postgres.pl b/check_postgres.pl index 40442751e..57276503d 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -2944,7 +2944,7 @@ sub check_version { if (length $critical) { if (($critfull and $critical ne $full) or (!$critfull and $critical ne $version)) { - do_mrtg({one => 0, msg => $full}); + $MRTG and do_mrtg({one => 0, msg => $full}); add_critical qq{version $full, but expected $critical}; $ok = 0; } @@ -2952,13 +2952,13 @@ sub check_version { elsif (length $warning) { if (($warnfull and $warning ne $full) or (!$warnfull and $warning ne $version)) { - do_mrtg({one => 0, msg => $full}); + $MRTG and do_mrtg({one => 0, msg => $full}); add_warning qq{version $full, but expected $warning}; $ok = 0; } } if ($ok) { - do_mrtg({one => 1, msg => $full}); + $MRTG and do_mrtg({one => 1, msg => $full}); add_ok "version $full"; } } -- 2.39.5