Permalink
Browse files

check_apt now correctly exits when apt-get return != 0

This commit fixes an issue with check_apt where check_apt doesn't exit
with the appropriate return code when apt-get returned a non-zero value.
  • Loading branch information...
g0hl1n committed May 29, 2013
1 parent 1fd504b commit 9be408511cbf10e4e4b5750459bf2a6d2e23d89d
Showing with 2 additions and 2 deletions.
  1. +2 −2 plugins/check_apt.c
View
@@ -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\n"),

0 comments on commit 9be4085

Please sign in to comment.