mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-03-02 05:10:34 -05:00
Merge pull request #54 from g0hl1n/check_apt_-_run_update_upgrade_return_fix
check_apt now correctly exits when apt-get return != 0
This commit is contained in:
commit
bb3bf05856
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|available_upgrades=%d;;;0 critical_updates=%d;;;0\n"),
|
||||
|
|
|
|||
Loading…
Reference in a new issue