diff options
author | wxs <wxs@FreeBSD.org> | 2011-06-05 03:02:16 +0800 |
---|---|---|
committer | wxs <wxs@FreeBSD.org> | 2011-06-05 03:02:16 +0800 |
commit | ac3b50cc2ac6c7b59a2a31135263d04586d1dd2e (patch) | |
tree | 166e9462055fe3d102ec62302a90172b9d3fd5c5 | |
parent | e54b43c61d78865a75ecce65fd3c910655a2cfaf (diff) | |
download | freebsd-ports-gnome-ac3b50cc2ac6c7b59a2a31135263d04586d1dd2e.tar.gz freebsd-ports-gnome-ac3b50cc2ac6c7b59a2a31135263d04586d1dd2e.tar.zst freebsd-ports-gnome-ac3b50cc2ac6c7b59a2a31135263d04586d1dd2e.zip |
NagTail is like tail(1), but for the nagios status.dat file.
PR: ports/157495
Submitted by: Ryan Steinmetz <rpsfa@rit.edu>
-rw-r--r-- | net-mgmt/Makefile | 1 | ||||
-rw-r--r-- | net-mgmt/nagtail/Makefile | 30 | ||||
-rw-r--r-- | net-mgmt/nagtail/distinfo | 2 | ||||
-rw-r--r-- | net-mgmt/nagtail/files/patch-br.cpp | 15 | ||||
-rw-r--r-- | net-mgmt/nagtail/files/patch-br.h | 18 | ||||
-rw-r--r-- | net-mgmt/nagtail/files/patch-main.cpp | 20 | ||||
-rw-r--r-- | net-mgmt/nagtail/files/patch-utils.cpp | 10 | ||||
-rw-r--r-- | net-mgmt/nagtail/pkg-descr | 3 |
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/ |