mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-02-20 00:10:09 -05:00
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.
This commit is contained in:
parent
1fd504b611
commit
9be408511c
1 changed files with 2 additions and 2 deletions
|
|
@ -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"),
|
||||
|
|
|
|||
Loading…
Reference in a new issue