summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Nierlein <sven@nierlein.org>2013-08-15 02:26:08 -0700
committerSven Nierlein <sven@nierlein.org>2013-08-15 02:26:08 -0700
commitbb3bf05856dc4feafca78c5f83edd48e6bde8064 (patch)
tree7c818237a17ffb93fe74082f724221d91fb150ca
parent2e6a0138de4eb87138372e25f9d895f816c8dd32 (diff)
parent9be408511cbf10e4e4b5750459bf2a6d2e23d89d (diff)
downloadmonitoring-plugins-bb3bf05856dc4feafca78c5f83edd48e6bde8064.tar.gz
Merge pull request #54 from g0hl1n/check_apt_-_run_update_upgrade_return_fix
check_apt now correctly exits when apt-get return != 0
-rw-r--r--plugins/check_apt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/check_apt.c b/plugins/check_apt.c
index 433055b5..daeb7578 100644
--- a/plugins/check_apt.c
+++ b/plugins/check_apt.c
@@ -112,8 +112,8 @@ int main (int argc, char **argv) {
112 result = max_state(result, STATE_CRITICAL); 112 result = max_state(result, STATE_CRITICAL);
113 } else if(packages_available > 0){ 113 } else if(packages_available > 0){
114 result = max_state(result, STATE_WARNING); 114 result = max_state(result, STATE_WARNING);
115 } else { 115 } else if(result > STATE_UNKNOWN){
116 result = max_state(result, STATE_OK); 116 result = STATE_UNKNOWN;
117 } 117 }
118 118
119 printf(_("APT %s: %d packages available for %s (%d critical updates). %s%s%s%s|available_upgrades=%d;;;0 critical_updates=%d;;;0\n"), 119 printf(_("APT %s: %d packages available for %s (%d critical updates). %s%s%s%s|available_upgrades=%d;;;0 critical_updates=%d;;;0\n"),