diff options
author | Sven Nierlein <sven@nierlein.org> | 2013-08-15 02:26:08 -0700 |
---|---|---|
committer | Sven Nierlein <sven@nierlein.org> | 2013-08-15 02:26:08 -0700 |
commit | bb3bf05856dc4feafca78c5f83edd48e6bde8064 (patch) | |
tree | 7c818237a17ffb93fe74082f724221d91fb150ca /plugins/check_apt.c | |
parent | 2e6a0138de4eb87138372e25f9d895f816c8dd32 (diff) | |
parent | 9be408511cbf10e4e4b5750459bf2a6d2e23d89d (diff) | |
download | monitoring-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
Diffstat (limited to 'plugins/check_apt.c')
-rw-r--r-- | plugins/check_apt.c | 4 |
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) { result = max_state(result, STATE_CRITICAL); } else if(packages_available > 0){ result = max_state(result, STATE_WARNING); - } else { - result = max_state(result, STATE_OK); + } else if(result > STATE_UNKNOWN){ + result = STATE_UNKNOWN; } printf(_("APT %s: %d packages available for %s (%d critical updates). %s%s%s%s|available_upgrades=%d;;;0 critical_updates=%d;;;0\n"), |