summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;