summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2006-03-21 16:37:36 +0000
committerweasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede>2006-03-21 16:37:36 +0000
commit828fced40558ef1033c26477f0af90f93e48972a (patch)
tree175cedfa50d756a1c9224e85b4517694fd22f3b5
parentcfe7901dbb3579964362946cfc05f58c16c2acc1 (diff)
Do not exit with warning if both normal and security updates are available
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@64 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
-rwxr-xr-xnagios-check-apt-updates4
1 files changed, 2 insertions, 2 deletions
diff --git a/nagios-check-apt-updates b/nagios-check-apt-updates
index 5bf1242..f89c592 100755
--- a/nagios-check-apt-updates
+++ b/nagios-check-apt-updates
@@ -186,10 +186,10 @@ my $updateinfo;
if (@updates_security) {
$updateinfo .= 'Security updates ('.(scalar @updates_security).'): '.join(', ', @updates_security)."; ";
$exit = $CRITICAL;
-};
+}
if (@updates_other) {
$updateinfo .= 'Other Updates ('.(scalar @updates_other).'): '.join(', ', @updates_other)."; ";
- $exit = $WARNING if $params->{'warnifupdates'};
+ $exit = $WARNING if ($params->{'warnifupdates'} and $exit == $OK);
};
$updateinfo = 'No updates available' unless defined $updateinfo;