summaryrefslogtreecommitdiff
path: root/net-mgmt/nagios-plugins/files/patch-check_nagios.c
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2006-05-15 13:07:20 +0000
committerPav Lucistnik <pav@FreeBSD.org>2006-05-15 13:07:20 +0000
commit28f968e38aecfca99842a5c484bf9436ba947619 (patch)
tree078e69ebce82ed0d478c472fee2936a8cd1b7d9b /net-mgmt/nagios-plugins/files/patch-check_nagios.c
parent- Update to 0.8.6.20060514 (diff)
Update to Nagios Plugins 1.4.3:
- Variable ordering and style realigned with bsd.port.mk - Moved manual pre-configure aclocal call to use bsd.autotools.mk (with manual tweak to ACLOCAL_ARGS required) - Listed resulting plug-in name in user configurable options - Removed remaining hard-coded variables including local state directory - Correctly identified location of Perl to configure script - Removed setlocale (LC_NUMERIC, "C") patch to plug-ins containing scanf(3) and an already defined LC_NUMERIC - Reworked all patches (named using make makepatch) - Corrected minor warning in check_ntp.pl regarding undefined use of $jitter PR: ports/97189 Submitted by: Jarrod Sayers <jarrod@netleader.com.au> (maintainer)
Diffstat (limited to 'net-mgmt/nagios-plugins/files/patch-check_nagios.c')
-rw-r--r--net-mgmt/nagios-plugins/files/patch-check_nagios.c53
1 files changed, 0 insertions, 53 deletions
diff --git a/net-mgmt/nagios-plugins/files/patch-check_nagios.c b/net-mgmt/nagios-plugins/files/patch-check_nagios.c
deleted file mode 100644
index 9413d92dabd7..000000000000
--- a/net-mgmt/nagios-plugins/files/patch-check_nagios.c
+++ /dev/null
@@ -1,53 +0,0 @@
---- plugins/check_nagios.c.orig Sun Jun 19 09:51:52 2005
-+++ plugins/check_nagios.c Sun Jun 19 09:53:28 2005
-@@ -26,6 +26,8 @@
- #include "common.h"
- #include "popen.h"
- #include "utils.h"
-+#include <sys/types.h>
-+#include <sys/stat.h>
-
- int process_arguments (int, char **);
- void print_help (void);
-@@ -42,12 +44,12 @@
- {
- int result = STATE_UNKNOWN;
- char input_buffer[MAX_INPUT_BUFFER];
-- unsigned long latest_entry_time = 0L;
-- unsigned long temp_entry_time = 0L;
-+ unsigned long latest_entry_time;
- int proc_entries = 0;
- time_t current_time;
- char *temp_ptr;
-- FILE *fp;
-+ struct stat sb;
-+ int err;
- int procuid = 0;
- int procppid = 0;
- int procvsz = 0;
-@@ -78,21 +80,14 @@
- alarm (timeout_interval);
-
- /* open the status log */
-- fp = fopen (status_log, "r");
-- if (fp == NULL) {
-- printf (_("CRITICAL - Cannot open status log for reading!\n"));
-+ err = stat(status_log, &sb);
-+ if (err) {
-+ printf (_("CRITICAL - Cannot get modification time of status log!\n"));
- return STATE_CRITICAL;
- }
-
- /* get the date/time of the last item updated in the log */
-- while (fgets (input_buffer, MAX_INPUT_BUFFER - 1, fp)) {
-- temp_ptr = strtok (input_buffer, "]");
-- temp_entry_time =
-- (temp_ptr == NULL) ? 0L : strtoul (temp_ptr + 1, NULL, 10);
-- if (temp_entry_time > latest_entry_time)
-- latest_entry_time = temp_entry_time;
-- }
-- fclose (fp);
-+ latest_entry_time = sb.st_mtime;
-
- if (verbose >= 2)
- printf(_("command: %s\n"), PS_COMMAND);