summaryrefslogtreecommitdiffstats
path: root/plugins/check_apt.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_apt.c')
-rw-r--r--plugins/check_apt.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/plugins/check_apt.c b/plugins/check_apt.c
index daeb7578..07622c2f 100644
--- a/plugins/check_apt.c
+++ b/plugins/check_apt.c
@@ -1,9 +1,9 @@
1/***************************************************************************** 1/*****************************************************************************
2* 2*
3* Nagios check_apt plugin 3* Monitoring check_apt plugin
4* 4*
5* License: GPL 5* License: GPL
6* Copyright (c) 2006-2008 Nagios Plugins Development Team 6* Copyright (c) 2006-2008 Monitoring Plugins Development Team
7* 7*
8* Original author: Sean Finney 8* Original author: Sean Finney
9* 9*
@@ -31,7 +31,7 @@
31 31
32const char *progname = "check_apt"; 32const char *progname = "check_apt";
33const char *copyright = "2006-2008"; 33const char *copyright = "2006-2008";
34const char *email = "nagiosplug-devel@lists.sourceforge.net"; 34const char *email = "devel@monitoring-plugins.org";
35 35
36#include "common.h" 36#include "common.h"
37#include "runcmd.h" 37#include "runcmd.h"
@@ -124,7 +124,7 @@ 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)?".":"",
128 packages_available, 128 packages_available,
129 sec_count 129 sec_count
130 ); 130 );
@@ -223,6 +223,9 @@ int run_upgrade(int *pkgcount, int *secpkgcount){
223 regex_t ireg, ereg, sreg; 223 regex_t ireg, ereg, sreg;
224 char *cmdline=NULL, rerrbuf[64]; 224 char *cmdline=NULL, rerrbuf[64];
225 225
226 /* initialize ereg as it is possible it is printed while uninitialized */
227 memset(&ereg, "\0", sizeof(ereg.buffer));
228
226 if(upgrade==NO_UPGRADE) return STATE_OK; 229 if(upgrade==NO_UPGRADE) return STATE_OK;
227 230
228 /* compile the regexps */ 231 /* compile the regexps */
@@ -430,7 +433,7 @@ print_help (void)
430 printf(UT_HELP_VRSN); 433 printf(UT_HELP_VRSN);
431 printf(UT_EXTRA_OPTS); 434 printf(UT_EXTRA_OPTS);
432 435
433 printf(UT_TIMEOUT, timeout_interval); 436 printf(UT_PLUG_TIMEOUT, timeout_interval);
434 437
435 printf (" %s\n", "-U, --upgrade=OPTS"); 438 printf (" %s\n", "-U, --upgrade=OPTS");
436 printf (" %s\n", _("[Default] Perform an upgrade. If an optional OPTS argument is provided,")); 439 printf (" %s\n", _("[Default] Perform an upgrade. If an optional OPTS argument is provided,"));