diff options
Diffstat (limited to 'plugins/check_apt.c')
-rw-r--r-- | plugins/check_apt.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/plugins/check_apt.c b/plugins/check_apt.c index cf186611..daeb7578 100644 --- a/plugins/check_apt.c +++ b/plugins/check_apt.c | |||
@@ -112,11 +112,11 @@ 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\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"), |
120 | state_text(result), | 120 | state_text(result), |
121 | packages_available, | 121 | packages_available, |
122 | (upgrade==DIST_UPGRADE)?"dist-upgrade":"upgrade", | 122 | (upgrade==DIST_UPGRADE)?"dist-upgrade":"upgrade", |
@@ -124,7 +124,9 @@ int main (int argc, char **argv) { | |||
124 | (stderr_warning)?" warnings detected":"", | 124 | (stderr_warning)?" warnings detected":"", |
125 | (stderr_warning && exec_warning)?",":"", | 125 | (stderr_warning && exec_warning)?",":"", |
126 | (exec_warning)?" errors detected":"", | 126 | (exec_warning)?" errors detected":"", |
127 | (stderr_warning||exec_warning)?". run with -v for information.":"" | 127 | (stderr_warning||exec_warning)?". run with -v for information.":"", |
128 | packages_available, | ||
129 | sec_count | ||
128 | ); | 130 | ); |
129 | 131 | ||
130 | return result; | 132 | return result; |
@@ -444,7 +446,7 @@ print_help (void) | |||
444 | printf (" %s\n", _("Do not run the upgrade. Probably not useful (without -u at least).")); | 446 | printf (" %s\n", _("Do not run the upgrade. Probably not useful (without -u at least).")); |
445 | printf (" %s\n", "-i, --include=REGEXP"); | 447 | printf (" %s\n", "-i, --include=REGEXP"); |
446 | printf (" %s\n", _("Include only packages matching REGEXP. Can be specified multiple times")); | 448 | printf (" %s\n", _("Include only packages matching REGEXP. Can be specified multiple times")); |
447 | printf (" %s\n", _("the values will be combined together. Any patches matching this list")); | 449 | printf (" %s\n", _("the values will be combined together. Any packages matching this list")); |
448 | printf (" %s\n", _("cause the plugin to return WARNING status. Others will be ignored.")); | 450 | printf (" %s\n", _("cause the plugin to return WARNING status. Others will be ignored.")); |
449 | printf (" %s\n", _("Default is to include all packages.")); | 451 | printf (" %s\n", _("Default is to include all packages.")); |
450 | printf (" %s\n", "-e, --exclude=REGEXP"); | 452 | printf (" %s\n", "-e, --exclude=REGEXP"); |