aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/nagios12
diff options
context:
space:
mode:
authorWill Andrews <will@FreeBSD.org>2000-07-12 18:43:32 +0000
committerWill Andrews <will@FreeBSD.org>2000-07-12 18:43:32 +0000
commit24138afdffd13e51deacee92f648ce3f061035bd (patch)
treed4864831023d0c7fbfaee7df7db8854da0053999 /net-mgmt/nagios12
parent7a90df77ff4e5447a3b6245a6407c7c3645880fc (diff)
downloadports-24138afdffd13e51deacee92f648ce3f061035bd.tar.gz
ports-24138afdffd13e51deacee92f648ce3f061035bd.zip
Add NetSaint 0.0.5-2, an extremely powerful network monitoring system.
Patches submitted by: Jim Sloan <odinn@atlantabiker.net>, to whom I am extremely grateful! Thanks!
Notes
Notes: svn path=/head/; revision=30533
Diffstat (limited to 'net-mgmt/nagios12')
-rw-r--r--net-mgmt/nagios12/Makefile29
-rw-r--r--net-mgmt/nagios12/distinfo1
-rw-r--r--net-mgmt/nagios12/files/patch-aa31
-rw-r--r--net-mgmt/nagios12/files/patch-ab8
-rw-r--r--net-mgmt/nagios12/files/patch-ac29
-rw-r--r--net-mgmt/nagios12/files/patch-ad60
-rw-r--r--net-mgmt/nagios12/files/patch-ae11
-rw-r--r--net-mgmt/nagios12/files/patch-af24
-rw-r--r--net-mgmt/nagios12/files/patch-ag31
-rw-r--r--net-mgmt/nagios12/files/patch-ah71
-rw-r--r--net-mgmt/nagios12/files/patch-ai22
-rw-r--r--net-mgmt/nagios12/pkg-comment1
-rw-r--r--net-mgmt/nagios12/pkg-descr13
-rw-r--r--net-mgmt/nagios12/pkg-plist222
-rw-r--r--net-mgmt/nagios12/scripts/checkps10
-rw-r--r--net-mgmt/nagios12/scripts/createuser49
16 files changed, 612 insertions, 0 deletions
diff --git a/net-mgmt/nagios12/Makefile b/net-mgmt/nagios12/Makefile
new file mode 100644
index 000000000000..8deae2a59135
--- /dev/null
+++ b/net-mgmt/nagios12/Makefile
@@ -0,0 +1,29 @@
+# New ports collection makefile for: netsaint
+# Date created: Wed 12 Jul 2000
+# Whom: will
+#
+# $FreeBSD$
+#
+
+PORTNAME= netsaint
+PORTVERSION= 0.0.5.2
+CATEGORIES= net
+MASTER_SITES= http://www.netsaint.org/download/
+DISTNAME= ${PORTNAME}-0.0.5-2
+
+MAINTAINER= will@FreeBSD.org
+
+LIB_DEPENDS= gd.1:${PORTSDIR}/graphics/gd
+
+GNU_CONFIGURE= yes
+CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
+ LIBS="-L${LOCALBASE}/lib -lgd"
+INSTALL_TARGET= install-all
+
+pre-fetch:
+ @${SH} ${SCRIPTDIR}/checkps
+
+pre-install:
+ ${PERL} ${SCRIPTDIR}/createuser
+
+.include <bsd.port.mk>
diff --git a/net-mgmt/nagios12/distinfo b/net-mgmt/nagios12/distinfo
new file mode 100644
index 000000000000..b77e807a2a4d
--- /dev/null
+++ b/net-mgmt/nagios12/distinfo
@@ -0,0 +1 @@
+MD5 (netsaint-0.0.5-2.tar.gz) = 19af41fb74ca4efbb1f6a4a915adc76f
diff --git a/net-mgmt/nagios12/files/patch-aa b/net-mgmt/nagios12/files/patch-aa
new file mode 100644
index 000000000000..3eb6719e49f6
--- /dev/null
+++ b/net-mgmt/nagios12/files/patch-aa
@@ -0,0 +1,31 @@
+--- Makefile.in Fri Apr 7 11:11:31 2000
++++ Makefile.in.new Mon Jun 12 19:33:19 2000
+@@ -36,7 +36,7 @@
+ @echo "Please supply a command line argument (i.e. 'make all'). Other targets are:"
+ @echo " netsaint cgis config"
+ @echo " clean distclean devclean"
+- @echo " install install-html install-config install-init install-daemoninit install-commandmode"
++ @echo " install install-html install-config install-init install-daemoninit install-commandmode install-all"
+ @echo " uninstall"
+
+ # FreeBSD make does not support -C option, so we'll use the Apache style... (patch by Stanley Hopcroft 12/27/1999)
+@@ -99,13 +99,17 @@
+ $(INSTALL) -m 664 $(INSTALL_OPTS) nscgi.cfg $(CGIDIR)
+
+ install-init:
+- $(INSTALL) -m 774 -o root -g root init-script /etc/rc.d/init.d/netsaint
++ $(INSTALL) -m 774 -o root -g wheel init-script /usr/local/etc/rc.d/netsaint.sh
++ $(INSTALL) -m 774 -o netsaint -g netsaint functions /usr/local/etc/netsaint/functions
+
+ install-daemoninit:
+- $(INSTALL) -m 774 -o root -g root daemon-init /etc/rc.d/init.d/netsaint
++ $(INSTALL) -m 774 -o root -g wheel daemon-init /usr/local/etc/rc.d/netsaint.sh
++ $(INSTALL) -m 774 -o netsaint -g netsaint functions /usr/local/etc/netsaint/functions
+
+ install-commandmode:
+ $(INSTALL) -m 775 $(COMMAND_OPTS) -d $(LOGDIR)/rw
+
+ uninstall:
+ rm -rf $(BINDIR)/netsaint $(CGIDIR)/*.cgi $(CFGDIR)/*.cfg $(HTMLDIR)
++
++install-all: all install config install-config install-daemoninit
diff --git a/net-mgmt/nagios12/files/patch-ab b/net-mgmt/nagios12/files/patch-ab
new file mode 100644
index 000000000000..f7ce712a1276
--- /dev/null
+++ b/net-mgmt/nagios12/files/patch-ab
@@ -0,0 +1,8 @@
+--- base/Makefile.in Fri Apr 7 11:11:32 2000
++++ base/Makefile.in.new Sat Jun 10 21:45:15 2000
+@@ -52,5 +52,4 @@
+ rm -f *~
+
+ install:
+- $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(BINDIR)
+ $(INSTALL) -m 774 $(INSTALL_OPTS) netsaint $(BINDIR)
diff --git a/net-mgmt/nagios12/files/patch-ac b/net-mgmt/nagios12/files/patch-ac
new file mode 100644
index 000000000000..1eb997a043fc
--- /dev/null
+++ b/net-mgmt/nagios12/files/patch-ac
@@ -0,0 +1,29 @@
+--- common/locations.sub Wed Apr 26 21:10:13 2000
++++ common/locations.sub.new Mon Jun 12 21:29:23 2000
+@@ -19,16 +19,16 @@
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ ************************************************************************/
+
+-#define DEFAULT_TEMP_FILE "${prefix}/var/netsaint.tmp"
+-#define DEFAULT_STATUS_FILE "${prefix}/var/status.log"
+-#define DEFAULT_LOG_FILE "${prefix}/var/netsaint.log"
+-#define DEFAULT_LOG_ARCHIVE_PATH "${prefix}/var/archives/"
+-#define DEFAULT_COMMENT_FILE "${prefix}/var/comment.log"
+-#define DEFAULT_COMMAND_FILE "${prefix}/var/rw/netsaint.cmd"
+-#define DEFAULT_PHYSICAL_HTML_PATH "${prefix}/share"
++#define DEFAULT_TEMP_FILE "${prefix}/var/netsaint/netsaint.tmp"
++#define DEFAULT_STATUS_FILE "${prefix}/var/netsaint/status.log"
++#define DEFAULT_LOG_FILE "${prefix}/var/netsaint/netsaint.log"
++#define DEFAULT_LOG_ARCHIVE_PATH "${prefix}/var/netsaint/archives/"
++#define DEFAULT_COMMENT_FILE "${prefix}/var/netsaint/comment.log"
++#define DEFAULT_COMMAND_FILE "${prefix}/var/netsaint/rw/netsaint.cmd"
++#define DEFAULT_PHYSICAL_HTML_PATH "${prefix}/share/netsaint"
+ #define DEFAULT_URL_HTML_PATH "/netsaint"
+-#define DEFAULT_PHYSICAL_CGIBIN_PATH "${exec_prefix}/sbin"
++#define DEFAULT_PHYSICAL_CGIBIN_PATH "${exec_prefix}/share/netsaint/sbin"
+ #define DEFAULT_URL_CGIBIN_PATH "/cgi-bin/netsaint"
+-#define DEFAULT_CGI_CONFIG_FILE "${exec_prefix}/sbin/nscgi.cfg"
++#define DEFAULT_CGI_CONFIG_FILE "${exec_prefix}/share/netsaint/sbin/nscgi.cfg"
+
+-#define LOCKFILE "${prefix}/var/netsaint.lock"
++#define LOCKFILE "${prefix}/var/netsaint/netsaint.lock"
diff --git a/net-mgmt/nagios12/files/patch-ad b/net-mgmt/nagios12/files/patch-ad
new file mode 100644
index 000000000000..33826d5aec6c
--- /dev/null
+++ b/net-mgmt/nagios12/files/patch-ad
@@ -0,0 +1,60 @@
+--- configure Fri Apr 7 11:11:34 2000
++++ configure.new Sat Jun 10 21:21:25 2000
+@@ -11,7 +11,7 @@
+ ac_help=
+ ac_default_prefix=/usr/local
+ # Any additions from configure.in:
+-ac_default_prefix=/usr/local/netsaint
++#ac_default_prefix=/usr/local/netsaint
+ ac_help="$ac_help
+ --with-netsaint-user=<user> sets user name to run netsaint"
+ ac_help="$ac_help
+@@ -61,12 +61,12 @@
+ x_includes=NONE
+ x_libraries=NONE
+ bindir='${exec_prefix}/bin'
+-sbindir='${exec_prefix}/sbin'
+-libexecdir='${exec_prefix}/libexec'
+-datadir='${prefix}/share'
+-sysconfdir='${prefix}/etc'
++sbindir='${exec_prefix}/share/netsaint/sbin'
++libexecdir='${exec_prefix}/libexec/netsaint'
++datadir='${prefix}/share/netsaint'
++sysconfdir='${prefix}/etc/netsaint'
+ sharedstatedir='${prefix}/com'
+-localstatedir='${prefix}/var'
++localstatedir='${prefix}/var/netsaint'
+ libdir='${exec_prefix}/lib'
+ includedir='${prefix}/include'
+ oldincludedir='/usr/include'
+@@ -505,9 +505,9 @@
+ # Prefer explicitly selected file to automatically selected ones.
+ if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
++ CONFIG_SITE="$prefix/share/netsaint/config.site $prefix/etc/netsaint/config.site"
+ else
+- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
++ CONFIG_SITE="$ac_default_prefix/share/netsaint/config.site $ac_default_prefix/etc/netsaint/config.site"
+ fi
+ fi
+ for ac_site_file in $CONFIG_SITE; do
+@@ -679,6 +679,9 @@
+ LDFLAGS="${LDFLAGS} -L${withval}"
+ LD_RUN_PATH="${withval}${LD_RUN_PATH:+:}${LD_RUN_PATH}"
+
++else
++ LDFLAGS="${LDFLAGS} -L/usr/local/lib"
++ LD_RUN_PATH="/usr/local/ib${LD_RUN_PATH:+:}${LD_RUN_PATH}"
+ fi
+
+ # Check whether --with-gd-inc or --without-gd-inc was given.
+@@ -686,6 +689,8 @@
+ withval="$with_gd_inc"
+
+ CFLAGS="${CFLAGS} -I${withval}"
++else
++ CFLAGS="${CFLAGS} -I/usr/local/include/gd"
+
+ fi
+
diff --git a/net-mgmt/nagios12/files/patch-ae b/net-mgmt/nagios12/files/patch-ae
new file mode 100644
index 000000000000..6cbf9e27ebbf
--- /dev/null
+++ b/net-mgmt/nagios12/files/patch-ae
@@ -0,0 +1,11 @@
+--- configure.in Fri Apr 7 11:11:34 2000
++++ configure.in.new Mon Jun 5 16:09:21 2000
+@@ -1,7 +1,7 @@
+ dnl Process this file with autoconf to produce a configure script.
+ AC_INIT(base/netsaint.c)
+ AC_CONFIG_HEADER(common/config.h base/netsaint.h cgi/cgiutils.h)
+-AC_PREFIX_DEFAULT(/usr/local/netsaint)
++AC_PREFIX_DEFAULT(/usr/local)
+
+ dnl Figure out how to invoke "install" and what install options to use.
+
diff --git a/net-mgmt/nagios12/files/patch-af b/net-mgmt/nagios12/files/patch-af
new file mode 100644
index 000000000000..58d7998ff8d8
--- /dev/null
+++ b/net-mgmt/nagios12/files/patch-af
@@ -0,0 +1,24 @@
+--- daemon-init.in Fri Apr 7 11:11:34 2000
++++ daemon-init.in.new Mon Jun 5 16:11:44 2000
+@@ -27,10 +27,11 @@
+
+ # Source function library
+ # Solaris doesn't have an rc.d directory, so do a test first
+-if [ -f /etc/rc.d/init.d/functions ]; then
+-. /etc/rc.d/init.d/functions
+-elif [ -f /etc/init.d/functions ]; then
+-. /etc/init.d/functions
++if [ -f /usr/local/etc/netsaint/functions ]; then
++. /usr/local/etc/netsaint/functions
++else
++ echo "/usr/local/etc/netsaint/functions missing"
++ exit 1
+ fi
+
+ prefix=@prefix@
+@@ -85,4 +86,4 @@
+ exit 1
+ esac
+
+-# End of this script
++# End of this script
diff --git a/net-mgmt/nagios12/files/patch-ag b/net-mgmt/nagios12/files/patch-ag
new file mode 100644
index 000000000000..14027c5d9cc9
--- /dev/null
+++ b/net-mgmt/nagios12/files/patch-ag
@@ -0,0 +1,31 @@
+--- functions Fri Apr 7 11:11:34 2000
++++ functions.new Sat Jun 10 13:31:31 2000
+@@ -11,7 +11,7 @@
+ #
+
+ # First set up a default search path.
+-PATH=/opt/gnu/bin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
++PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin
+ export PATH
+
+ # Get a sane screen width
+@@ -174,7 +174,7 @@
+ # fi
+
+ # Finally try to extract it from ps
+- pid=`ps -eo pid,ppid,fname | egrep -v $$ | awk 'BEGIN { prog=ARGV[1]; ARGC=1 } { if ((prog == $3) || (("(" prog ")") == $3) || (("[" prog "]") == $3) || ((prog ":") == $3)) { print $1 ; exit 0 } }' $1`
++ pid=`ps -axco pid,ppid,command | egrep -v $$ | awk 'BEGIN { prog=ARGV[1]; ARGC=1 } { if ((prog == $3) || (("(" prog ")") == $3) || (("[" prog "]") == $3) || ((prog ":") == $3)) { print $1 ; exit 0 } }' $1`
+ if [ "$pid" != "" ] ; then
+ echo $pid
+ return 0
+@@ -206,8 +206,8 @@
+ fi
+ fi
+
+- # See if /var/lock/subsys/$1 exists
+- if [ -f /var/lock/subsys/$1 ]; then
++ # See if /var/spool/lock/$1 exists
++ if [ -f /var/spool/lock/$1 ]; then
+ echo "$1 dead but subsys locked"
+ return 2
+ fi
diff --git a/net-mgmt/nagios12/files/patch-ah b/net-mgmt/nagios12/files/patch-ah
new file mode 100644
index 000000000000..a8023ecea7f1
--- /dev/null
+++ b/net-mgmt/nagios12/files/patch-ah
@@ -0,0 +1,71 @@
+--- hosts.cfg.in Fri Apr 7 11:11:34 2000
++++ hosts.cfg.in.new Thu Jun 15 10:19:42 2000
+@@ -151,10 +151,10 @@
+
+ hostgroup[novell-servers]=All Novell Servers;novell-admins;es-gra,es-esp
+ hostgroup[nt-servers]=All NT Servers;nt-admins;rosie,dev,liatris
+-hostgroup[linux-boxes]=All Linux Servers;linux-admins;real
++hostgroup[freebsd-boxes]=All FreeBSD Servers;freebsd-admins;real
+ hostgroup[switches]=Switches;switch-admins;switch-4hlan,switch-esplan,switch-gralan,switch-cetslan,switch-hrdlan
+ hostgroup[routers]=Routers;router-admins;ageng-router
+-hostgroup[printers]=Printers;printer-admins,linux-admins;cofh-475-lj4m,cofh-415-lj4,cofh-405-lj4000
++hostgroup[printers]=Printers;printer-admins,freebsd-admins;cofh-475-lj4m,cofh-415-lj4,cofh-405-lj4000
+
+
+ ################################################################################
+@@ -183,19 +183,19 @@
+
+ # Service notification command - send email with problem summary
+
+-command[notify-by-email]=/bin/echo -e $SUMMARY$ | /bin/mail -s '** $SERVICESTATE$ alert for $HOSTALIAS$/$SERVICEDESC$ **' $CONTACTEMAIL$
++command[notify-by-email]=/usr/bin/printf $SUMMARY$ | /usr/bin/mail -s '** $SERVICESTATE$ alert for $HOSTALIAS$/$SERVICEDESC$ **' $CONTACTEMAIL$
+
+ # Service notification command - send email to alphanumeric pager gateway
+ # The notify-by-epager command assumes that each contact has a pager email gateway, and
+ # that the address has been entered into the appropriate contact field instead of an
+ # actual pager number. (i.e. 'pagejoe@nowhere.com' routes mail to Joe's alphanumeric pager)
+
+-command[notify-by-epager]=/bin/echo -e 'Service: $SERVICEDESC$\nHost: $HOSTNAME$\nAddress: $HOSTADDRESS$\nInfo: $OUTPUT$' | /bin/mail -s '$SERVICESTATE$ alert for $HOSTALIAS$/$SERVICEDESC$' $CONTACTPAGER$
++command[notify-by-epager]=/usr/bin/printf 'Service: $SERVICEDESC$\nHost: $HOSTNAME$\nAddress: $HOSTADDRESS$\nInfo: $OUTPUT$' | /usr/bin/mail -s '$SERVICESTATE$ alert for $HOSTALIAS$/$SERVICEDESC$' $CONTACTPAGER$
+
+ # Host notification commands (one for email, one for alphanumeric pager with email gateway)
+
+-command[host-notify-by-email]=/bin/echo -e '***** NetSaint 0.0.5 *****\n\nHost "$HOSTALIAS$" is $HOSTSTATE$!\n\nDate/Time: $DATETIME$\n' | /bin/mail -s 'Host $HOSTNAME$ is $HOSTSTATE$!' $CONTACTEMAIL$
+-command[host-notify-by-epager]=/bin/echo -e 'Host "$HOSTALIAS$" is $HOSTSTATE$!' | /bin/mail -s 'Host $HOSTNAME$ is $HOSTSTATE$!' $CONTACTPAGER$
++command[host-notify-by-email]=/usr/bin/printf '***** NetSaint 0.0.5 *****\n\nHost "$HOSTALIAS$" is $HOSTSTATE$!\n\nDate/Time: $DATETIME$\n' | /usr/bin/mail -s 'Host $HOSTNAME$ is $HOSTSTATE$!' $CONTACTEMAIL$
++command[host-notify-by-epager]=/usr/bin/printf 'Host "$HOSTALIAS$" is $HOSTSTATE$!' | /usr/bin/mail -s 'Host $HOSTNAME$ is $HOSTSTATE$!' $CONTACTPAGER$
+
+ # These are some example service check commands. See the HTML documentation on the plugins for
+ # examples of how to configure command definitions.
+@@ -316,7 +316,7 @@
+
+ contactgroup[novell-admins]=Novell Administrators;@netsaint_user@
+ contactgroup[nt-admins]=NT Administrators;@netsaint_user@,jdoe
+-contactgroup[linux-admins]=Linux Administrators;@netsaint_user@
++contactgroup[freebsd-admins]=FreeBSD Administrators;@netsaint_user@
+ contactgroup[switch-admins]=Etherswitch Administrators;@netsaint_user@
+ contactgroup[router-admins]=Router Technicians;@netsaint_user@
+ contactgroup[printer-admins]=Etherswitch Administrators;@netsaint_user@,jdoe
+@@ -428,14 +428,14 @@
+ service[liatris]=PING;24x7;3;5;1;maes-admins;240;workhours;1;1;0;;check_ping
+ service[liatris]=MAES Publications;24x7;3;2;1;maes-admins;240;workhours;1;1;1;;check_http2!192.168.2.2!/publications
+
+-# Linux Box
+-service[real]=PING;24x7;3;5;1;linux-admins;240;24x7;1;1;0;;check_ping
+-service[real]=HTTP;24x7;3;2;1;linux-admins;240;24x7;1;1;1;;check_http
+-service[real]=Current Users;24x7;3;5;2;linux-admins;240;24x7;1;1;1;;check_users!75!150
+-service[real]=Zombie Processes;24x7;3;5;2;linux-admins;240;24x7;1;1;1;;check_procs!5!10!Z
+-service[real]=Total Processes;24x7;3;5;2;linux-admins;240;24x7;1;1;1;;check_procs!150!200
+-service[real]=Drive 1 Free Space;24x7;3;5;1;linux-admins;120;24x7;1;1;1;;check_disk!/dev/hda1
+-service[real]=Drive 2 Free Space;24x7;3;5;1;linux-admins;120;24x7;1;1;1;;check_disk!/dev/hdb2
++# FreeBSD Box
++service[real]=PING;24x7;3;5;1;freebsd-admins;240;24x7;1;1;0;;check_ping
++service[real]=HTTP;24x7;3;2;1;freebsd-admins;240;24x7;1;1;1;;check_http
++service[real]=Current Users;24x7;3;5;2;freebsd-admins;240;24x7;1;1;1;;check_users!75!150
++service[real]=Zombie Processes;24x7;3;5;2;freebsd-admins;240;24x7;1;1;1;;check_procs!5!10!Z
++service[real]=Total Processes;24x7;3;5;2;freebsd-admins;240;24x7;1;1;1;;check_procs!150!200
++service[real]=Drive 1 Free Space;24x7;3;5;1;freebsd-admins;120;24x7;1;1;1;;check_disk!/dev/hda1
++service[real]=Drive 2 Free Space;24x7;3;5;1;freebsd-admins;120;24x7;1;1;1;;check_disk!/dev/hdb2
+
+ # Switches
+ service[switch-esplan]=Traffic Rate;24x7;1;5;6;switch-admins;60;24x7;0;0;0;;traffic_average!/home/httpd/html/mrtg/esp-lan.log!600000!800000!600000!800000
diff --git a/net-mgmt/nagios12/files/patch-ai b/net-mgmt/nagios12/files/patch-ai
new file mode 100644
index 000000000000..7f1b2a014d5e
--- /dev/null
+++ b/net-mgmt/nagios12/files/patch-ai
@@ -0,0 +1,22 @@
+--- init-script.in Fri Apr 7 11:11:37 2000
++++ init-script.in.new Mon Jun 12 19:28:55 2000
+@@ -26,11 +26,8 @@
+ #
+
+ # Source function library
+-# Solaris doesn't have an rc.d directory, so do a test first
+-if [ -f /etc/rc.d/init.d/functions ]; then
+-. /etc/rc.d/init.d/functions
+-elif [ -f /etc/init.d/functions ]; then
+-. /etc/init.d/functions
++if [ -f /usr/local/etc/netsaint/functions ]; then
++. /usr/local/etc/netsaint/functions
+ fi
+
+ prefix=@prefix@
+@@ -92,4 +89,4 @@
+
+ # End of this script
+
+-
++
diff --git a/net-mgmt/nagios12/pkg-comment b/net-mgmt/nagios12/pkg-comment
new file mode 100644
index 000000000000..5641db14d8cc
--- /dev/null
+++ b/net-mgmt/nagios12/pkg-comment
@@ -0,0 +1 @@
+Extremely powerful network monitoring system
diff --git a/net-mgmt/nagios12/pkg-descr b/net-mgmt/nagios12/pkg-descr
new file mode 100644
index 000000000000..e16ce94fefe6
--- /dev/null
+++ b/net-mgmt/nagios12/pkg-descr
@@ -0,0 +1,13 @@
+NetSaint is a program that will monitor hosts and services
+on your network. It has the ability to email or page you
+when a problem arises and when it gets resolved. NetSaint
+is written in C and is designed to run under Linux, although
+it should work under most other *NIX variants. It can run
+either as a normal process or as a daemon, intermittently
+running checks on various services that you specify. The
+actual service checks are performed by external "plugins"
+which return service information to NetSaint. Several CGI
+programs are included with NetSaint in order to allow you
+to view the current service status, history, etc. via a web browser.
+
+WWW: http://www.netsaint.org/
diff --git a/net-mgmt/nagios12/pkg-plist b/net-mgmt/nagios12/pkg-plist
new file mode 100644
index 000000000000..dac9eed45ef4
--- /dev/null
+++ b/net-mgmt/nagios12/pkg-plist
@@ -0,0 +1,222 @@
+bin/netsaint
+etc/netsaint/netsaint.cfg
+etc/netsaint/hosts.cfg
+etc/netsaint/functions
+etc/rc.d/netsaint.sh
+share/netsaint/docs/about.html
+share/netsaint/docs/addons.html
+share/netsaint/docs/cgiauth.html
+share/netsaint/docs/cgis.html
+share/netsaint/docs/config.html
+share/netsaint/docs/configcgi.html
+share/netsaint/docs/confighost.html
+share/netsaint/docs/configmain.html
+share/netsaint/docs/eventhandlers.html
+share/netsaint/docs/extcommands.html
+share/netsaint/docs/faqs.html
+share/netsaint/docs/funstuff.html
+share/netsaint/docs/images/cmd_cgi.gif
+share/netsaint/docs/images/config_cgi.gif
+share/netsaint/docs/images/extinfo_cgi_a.gif
+share/netsaint/docs/images/extinfo_cgi_b.gif
+share/netsaint/docs/images/extinfo_cgi_c.gif
+share/netsaint/docs/images/extinfo_cgi_d.gif
+share/netsaint/docs/images/history_cgi.gif
+share/netsaint/docs/images/logic-host-event-handler.gif
+share/netsaint/docs/images/logic-host-notification.gif
+share/netsaint/docs/images/logic-host-state-handler.gif
+share/netsaint/docs/images/logic-route-check.gif
+share/netsaint/docs/images/logic-service-event-handler.gif
+share/netsaint/docs/images/logic-service-notification.gif
+share/netsaint/docs/images/logic-service-problem.gif
+share/netsaint/docs/images/logic-service-recovery.gif
+share/netsaint/docs/images/logic-top.gif
+share/netsaint/docs/images/network-heirarchy.gif
+share/netsaint/docs/images/notification-process.gif
+share/netsaint/docs/images/notifications_cgi.gif
+share/netsaint/docs/images/physical-network.gif
+share/netsaint/docs/images/redundancy-1.gif
+share/netsaint/docs/images/redundancy-2.gif
+share/netsaint/docs/images/relationship-complex.gif
+share/netsaint/docs/images/relationship-simple.gif
+share/netsaint/docs/images/showlog_cgi.gif
+share/netsaint/docs/images/status_cgi_a.gif
+share/netsaint/docs/images/status_cgi_b.gif
+share/netsaint/docs/images/statusmap_cgi.gif
+share/netsaint/docs/images/statuswrl_cgi.gif
+share/netsaint/docs/index.html
+share/netsaint/docs/installing.html
+share/netsaint/docs/installweb.html
+share/netsaint/docs/macros.html
+share/netsaint/docs/makehtml.html
+share/netsaint/docs/networkreachability.html
+share/netsaint/docs/notifications.html
+share/netsaint/docs/parallelization.html
+share/netsaint/docs/pluginhowto.html
+share/netsaint/docs/plugins.html
+share/netsaint/docs/programmodes.html
+share/netsaint/docs/redundancy.html
+share/netsaint/docs/robots.txt
+share/netsaint/docs/starting.html
+share/netsaint/docs/statetypes.html
+share/netsaint/docs/statuslevels.html
+share/netsaint/docs/stoprestart.html
+share/netsaint/docs/theory-network.html
+share/netsaint/docs/theory-time.html
+share/netsaint/docs/theory.html
+share/netsaint/docs/timeperiods.html
+share/netsaint/docs/verifyconfig.html
+share/netsaint/docs/whatsnew.html
+share/netsaint/images/active.gif
+share/netsaint/images/command.gif
+share/netsaint/images/commandsbar.gif
+share/netsaint/images/comment.gif
+share/netsaint/images/config.gif
+share/netsaint/images/contact.gif
+share/netsaint/images/contactgroup.gif
+share/netsaint/images/contactgroupsbar.gif
+share/netsaint/images/contactsbar.gif
+share/netsaint/images/critical.gif
+share/netsaint/images/delay.gif
+share/netsaint/images/delete.gif
+share/netsaint/images/disabled.gif
+share/netsaint/images/docbar.gif
+share/netsaint/images/enabled.gif
+share/netsaint/images/greendot.gif
+share/netsaint/images/history.gif
+share/netsaint/images/historybar.gif
+share/netsaint/images/homebar.gif
+share/netsaint/images/host.gif
+share/netsaint/images/hostevent.gif
+share/netsaint/images/hostgroupsbar.gif
+share/netsaint/images/hostsbar.gif
+share/netsaint/images/info.gif
+share/netsaint/images/left.gif
+share/netsaint/images/logfilebar.gif
+share/netsaint/images/logofullsize.gif
+share/netsaint/images/logos/aix.gd2
+share/netsaint/images/logos/aix.gif
+share/netsaint/images/logos/amiga.gd2
+share/netsaint/images/logos/amiga.gif
+share/netsaint/images/logos/apple.gd2
+share/netsaint/images/logos/apple.gif
+share/netsaint/images/logos/beos.gd2
+share/netsaint/images/logos/beos.gif
+share/netsaint/images/logos/caldera.gd2
+share/netsaint/images/logos/caldera.gif
+share/netsaint/images/logos/cat1900.gd2
+share/netsaint/images/logos/cat2900.gd2
+share/netsaint/images/logos/cat5000.gd2
+share/netsaint/images/logos/debian.gd2
+share/netsaint/images/logos/debian.gif
+share/netsaint/images/logos/freebsd40.gd2
+share/netsaint/images/logos/freebsd40.gif
+share/netsaint/images/logos/hp-printer40.gd2
+share/netsaint/images/logos/hp-printer40.gif
+share/netsaint/images/logos/hpux.gd2
+share/netsaint/images/logos/hpux.gif
+share/netsaint/images/logos/irix.gd2
+share/netsaint/images/logos/irix.gif
+share/netsaint/images/logos/linux40.gd2
+share/netsaint/images/logos/linux40.gif
+share/netsaint/images/logos/logo.gd2
+share/netsaint/images/logos/mac40.gd2
+share/netsaint/images/logos/mac40.gif
+share/netsaint/images/logos/mandrake.gd2
+share/netsaint/images/logos/mandrake.gif
+share/netsaint/images/logos/next.gd2
+share/netsaint/images/logos/next.gif
+share/netsaint/images/logos/ng-switch40.gd2
+share/netsaint/images/logos/ng-switch40.gif
+share/netsaint/images/logos/novell40.gd2
+share/netsaint/images/logos/novell40.gif
+share/netsaint/images/logos/openbsd.gd2
+share/netsaint/images/logos/openbsd.gif
+share/netsaint/images/logos/redhat.gd2
+share/netsaint/images/logos/redhat.gif
+share/netsaint/images/logos/router40.gd2
+share/netsaint/images/logos/router40.gif
+share/netsaint/images/logos/slackware.gd2
+share/netsaint/images/logos/slackware.gif
+share/netsaint/images/logos/stampede.gd2
+share/netsaint/images/logos/stampede.gif
+share/netsaint/images/logos/storm.gd2
+share/netsaint/images/logos/storm.gif
+share/netsaint/images/logos/sun40.gd2
+share/netsaint/images/logos/sun40.gif
+share/netsaint/images/logos/sunlogo.gd2
+share/netsaint/images/logos/sunlogo.gif
+share/netsaint/images/logos/switch40.gd2
+share/netsaint/images/logos/switch40.gif
+share/netsaint/images/logos/turbolinux.gd2
+share/netsaint/images/logos/turbolinux.gif
+share/netsaint/images/logos/ultrapenguin.gd2
+share/netsaint/images/logos/ultrapenguin.gif
+share/netsaint/images/logos/unicos.gd2
+share/netsaint/images/logos/unicos.gif
+share/netsaint/images/logos/unknown.gd2
+share/netsaint/images/logos/win40.gd2
+share/netsaint/images/logos/win40.gif
+share/netsaint/images/logos/yellowdog.gd2
+share/netsaint/images/logos/yellowdog.gif
+share/netsaint/images/logrotate.gif
+share/netsaint/images/logs.gif
+share/netsaint/images/ndisabled.gif
+share/netsaint/images/networkhealthbar.gif
+share/netsaint/images/notes.gif
+share/netsaint/images/notificationsbar.gif
+share/netsaint/images/notify.gif
+share/netsaint/images/orangedot.gif
+share/netsaint/images/parentup.gif
+share/netsaint/images/processinfobar.gif
+share/netsaint/images/recovery.gif
+share/netsaint/images/restart.gif
+share/netsaint/images/right.gif
+share/netsaint/images/sbbg.gif
+share/netsaint/images/sbconfig.gif
+share/netsaint/images/sbgeneral.gif
+share/netsaint/images/sblogo.gif
+share/netsaint/images/sbmonitor.gif
+share/netsaint/images/scale.gif
+share/netsaint/images/serviceevent.gif
+share/netsaint/images/servicesbar.gif
+share/netsaint/images/standby.gif
+share/netsaint/images/start.gif
+share/netsaint/images/statudetailbar.gif
+share/netsaint/images/status.gif
+share/netsaint/images/status2.gif
+share/netsaint/images/status3.gif
+share/netsaint/images/status4.gif
+share/netsaint/images/statusdetailbar.gif
+share/netsaint/images/statusmapbar.gif
+share/netsaint/images/statusoverviewbar.gif
+share/netsaint/images/statusworldbar.gif
+share/netsaint/images/stop.gif
+share/netsaint/images/thermcrit.gif
+share/netsaint/images/thermok.gif
+share/netsaint/images/thermwarn.gif
+share/netsaint/images/timeperiodsbar.gif
+share/netsaint/images/unknown.gif
+share/netsaint/images/warning.gif
+share/netsaint/images/xinfo.gif
+share/netsaint/images/zombie.gif
+share/netsaint/index.html
+share/netsaint/main.html
+share/netsaint/robots.txt
+share/netsaint/sbin/cmd.cgi
+share/netsaint/sbin/config.cgi
+share/netsaint/sbin/extinfo.cgi
+share/netsaint/sbin/history.cgi
+share/netsaint/sbin/notifications.cgi
+share/netsaint/sbin/nscgi.cfg
+share/netsaint/sbin/showlog.cgi
+share/netsaint/sbin/status.cgi
+share/netsaint/sbin/statusmap.cgi
+share/netsaint/sbin/statuswrl.cgi
+share/netsaint/side.html
+@dirrm share/netsaint/sbin
+@dirrm share/netsaint/images/logos
+@dirrm share/netsaint/images
+@dirrm share/netsaint/docs/images
+@dirrm share/netsaint/docs
+@dirrm share/netsaint
diff --git a/net-mgmt/nagios12/scripts/checkps b/net-mgmt/nagios12/scripts/checkps
new file mode 100644
index 000000000000..61a4d67baaa7
--- /dev/null
+++ b/net-mgmt/nagios12/scripts/checkps
@@ -0,0 +1,10 @@
+#!/bin/sh
+/bin/ps 999999 2>&1 >/dev/null
+if [ $? = 0 ]; then
+ echo "You need to upgrade to RELENG_3, RELENG_4, or HEAD sometime"
+ echo "after July 8, 2000 around 5:15AM UTC, so that ps(1) will"
+ echo "return an error code if a PID does not exist. Netsaint needs this!"
+ exit
+else
+ echo "Great, you have a working ps(1)! Netsaint can build."
+fi
diff --git a/net-mgmt/nagios12/scripts/createuser b/net-mgmt/nagios12/scripts/createuser
new file mode 100644
index 000000000000..ce858d738462
--- /dev/null
+++ b/net-mgmt/nagios12/scripts/createuser
@@ -0,0 +1,49 @@
+#!/usr/bin/perl
+#
+
+eval '(exit $?0)' && eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
+& eval 'exec /usr/bin/perl -S $0 $argv:q'
+if 0;
+
+if( $> ) {
+ print "\nYou must be root to run this step!\n\n";
+ exit 1;
+}
+
+if( getpwnam( "netsaint" ) ) {
+ ( $null, $null, $nsUID ) = getpwnam( "netsaint" );
+} else {
+ $nsUID = 70;
+ while( getpwuid( $nsUID ) ) {
+ $nsUID++;
+ }
+}
+
+if( getgrnam( "netsaint" ) ) {
+ ( $null, $null, $nsGID ) = getgrnam( "netsaint" );
+} else {
+ $nsGID = 70;
+ while( getgrgid( $nsGID ) ) {
+ $nsGID++;
+ }
+ &append_file( "/etc/group", "netsaint:*:$nsGID:" );
+}
+
+print "netsaint user using uid $nsUID and gid $nsGID\n";
+
+system( "/usr/bin/chpass -a \"netsaint:*:$nsUID:$nsGID\:\:0:0:Netsaint pseudo-user:$ENV{'PREFIX'}/netsaint:/bin/sh\"" );
+
+sub append_file {
+ local($file,@list) = @_;
+ local($LOCK_EX) = 2;
+ local($LOCK_NB) = 4;
+ local($LOCK_UN) = 8;
+
+ open(F, ">> $file") || die "$file: $!\n";
+ while( ! flock( F, $LOCK_EX | $LOCK_NB ) ) {
+ exit 1;
+ }
+ print F join( "\n", @list) . "\n";
+ close F;
+ flock( F, $LOCK_UN );
+}