summaryrefslogtreecommitdiff
path: root/net-mgmt
diff options
context:
space:
mode:
authorWesley Shields <wxs@FreeBSD.org>2011-06-04 19:02:16 +0000
committerWesley Shields <wxs@FreeBSD.org>2011-06-04 19:02:16 +0000
commit1b4f975f98bfd1ac7d7f6e810e679c71a854310e (patch)
tree9a64566b2d28740306dc1cfbf1f6284f8f897e02 /net-mgmt
parentAdd working Mastersites (diff)
NagTail is like tail(1), but for the nagios status.dat file.
PR: ports/157495 Submitted by: Ryan Steinmetz <rpsfa@rit.edu>
Notes
Notes: svn path=/head/; revision=275066
Diffstat (limited to 'net-mgmt')
-rw-r--r--net-mgmt/Makefile1
-rw-r--r--net-mgmt/nagtail/Makefile30
-rw-r--r--net-mgmt/nagtail/distinfo2
-rw-r--r--net-mgmt/nagtail/files/patch-br.cpp15
-rw-r--r--net-mgmt/nagtail/files/patch-br.h18
-rw-r--r--net-mgmt/nagtail/files/patch-main.cpp20
-rw-r--r--net-mgmt/nagtail/files/patch-utils.cpp10
-rw-r--r--net-mgmt/nagtail/pkg-descr3
8 files changed, 99 insertions, 0 deletions
diff --git a/net-mgmt/Makefile b/net-mgmt/Makefile
index efd4e352b985..560ededb1bb1 100644
--- a/net-mgmt/Makefile
+++ b/net-mgmt/Makefile
@@ -143,6 +143,7 @@
SUBDIR += nagiostat
SUBDIR += nagircbot
SUBDIR += nagstamon
+ SUBDIR += nagtail
SUBDIR += nagvis
SUBDIR += nat
SUBDIR += nbtscan
diff --git a/net-mgmt/nagtail/Makefile b/net-mgmt/nagtail/Makefile
new file mode 100644
index 000000000000..5eb86ec59b38
--- /dev/null
+++ b/net-mgmt/nagtail/Makefile
@@ -0,0 +1,30 @@
+# New ports collection makefile for: net-mgmt/nagtail
+# Date created: 1 June 2011
+# Whom: Ryan Steinmetz <rpsfa@rit.edu>
+#
+# $FreeBSD$
+#
+
+PORTNAME= nagtail
+PORTVERSION= 0.0.31
+CATEGORIES= net-mgmt
+MASTER_SITES= http://www.vanheusden.com/nagtail/ \
+ http://people.rit.edu/rpsfa/
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= rpsfa@rit.edu
+COMMENT= Tail for the nagios status.dat file
+
+USE_GMAKE= yes
+
+MAN1= nagtail.1
+MANCOMPRESSED= yes
+PLIST_FILES= bin/nagtail
+
+.include <bsd.port.pre.mk>
+
+do-install:
+ @${INSTALL_PROGRAM} ${WRKSRC}/nagtail ${PREFIX}/bin
+ @${INSTALL_MAN} ${WRKSRC}/nagtail.1.gz ${MAN1PREFIX}/man/man1
+
+.include <bsd.port.post.mk>
diff --git a/net-mgmt/nagtail/distinfo b/net-mgmt/nagtail/distinfo
new file mode 100644
index 000000000000..dffe8921c809
--- /dev/null
+++ b/net-mgmt/nagtail/distinfo
@@ -0,0 +1,2 @@
+SHA256 (nagtail-0.0.31.tgz) = 8c26bee07a75de77a0c74b3c2ee1dfba59bca1258259748cd92ed364b828f2aa
+SIZE (nagtail-0.0.31.tgz) = 13995
diff --git a/net-mgmt/nagtail/files/patch-br.cpp b/net-mgmt/nagtail/files/patch-br.cpp
new file mode 100644
index 000000000000..c6de7b77ebd8
--- /dev/null
+++ b/net-mgmt/nagtail/files/patch-br.cpp
@@ -0,0 +1,15 @@
+--- br.cpp.orig 2011-06-01 07:28:11.000000000 -0400
++++ br.cpp 2011-06-01 07:28:49.000000000 -0400
+@@ -251,10 +251,10 @@
+ return out;
+ }
+
+-off64_t buffered_reader::file_offset(void)
++off_t buffered_reader::file_offset(void)
+ {
+ if (mmap_addr)
+ return cur_offset - mmap_addr;
+ else
+- return lseek64(fd, 0, SEEK_CUR);
++ return lseek(fd, 0, SEEK_CUR);
+ }
diff --git a/net-mgmt/nagtail/files/patch-br.h b/net-mgmt/nagtail/files/patch-br.h
new file mode 100644
index 000000000000..f66f088f71b9
--- /dev/null
+++ b/net-mgmt/nagtail/files/patch-br.h
@@ -0,0 +1,18 @@
+--- br.h.orig 2011-06-01 07:45:29.000000000 -0400
++++ br.h 2011-06-01 07:45:38.000000000 -0400
+@@ -33,7 +33,7 @@
+ char *buffer;
+ long long int buffer_length, buffer_pointer;
+ char *mmap_addr, *cur_offset;
+- off64_t size_of_file;
++ off_t size_of_file;
+
+ int number_of_bytes_in_buffer(void);
+ int read_into_buffer(void);
+@@ -46,5 +46,5 @@
+
+ char * read_line(void);
+
+- off64_t file_offset(void);
++ off_t file_offset(void);
+ };
diff --git a/net-mgmt/nagtail/files/patch-main.cpp b/net-mgmt/nagtail/files/patch-main.cpp
new file mode 100644
index 000000000000..e9b0cd777f9f
--- /dev/null
+++ b/net-mgmt/nagtail/files/patch-main.cpp
@@ -0,0 +1,20 @@
+--- main.cpp.orig 2011-06-01 07:45:51.000000000 -0400
++++ main.cpp 2011-06-01 07:46:28.000000000 -0400
+@@ -35,7 +35,7 @@
+ struct stats *prev = NULL;
+ int n_prev = 0;
+ int c;
+- char *statuslog = "/usr/local/nagios/var/status.log";
++ char *statuslog = "/var/spool/nagios/status.dat";
+ int check_interval = 60;
+ char verbose = 0;
+ char is_20_format = 1;
+@@ -110,7 +110,7 @@
+ }
+
+ if (is_file == 1) /* file */
+- fd = open64(statuslog, O_RDONLY);
++ fd = open(statuslog, O_RDONLY);
+ else
+ fd = connect_to(statuslog);
+
diff --git a/net-mgmt/nagtail/files/patch-utils.cpp b/net-mgmt/nagtail/files/patch-utils.cpp
new file mode 100644
index 000000000000..7ad864710f08
--- /dev/null
+++ b/net-mgmt/nagtail/files/patch-utils.cpp
@@ -0,0 +1,10 @@
+--- utils.cpp.orig 2011-06-01 07:30:26.000000000 -0400
++++ utils.cpp 2011-06-01 07:30:35.000000000 -0400
+@@ -29,6 +29,7 @@
+ #include <netdb.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
++#include <netinet/in.h>
+ extern "C" {
+ #include "error.h"
+ }
diff --git a/net-mgmt/nagtail/pkg-descr b/net-mgmt/nagtail/pkg-descr
new file mode 100644
index 000000000000..33f1177d806b
--- /dev/null
+++ b/net-mgmt/nagtail/pkg-descr
@@ -0,0 +1,3 @@
+NagTail is like tail(1), but for the nagios status.dat file.
+
+WWW: http://www.vanheusden.com/nagtail/