summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorijliao <ijliao@FreeBSD.org>2001-05-17 06:02:17 +0000
committerijliao <ijliao@FreeBSD.org>2001-05-17 06:02:17 +0000
commitc554a974657fe46888241ff9b078de51f10e1be4 (patch)
tree8a634db483ecb554faf2dd9bd9d410fdc5be125d
parent1fbd87592990f5ffacbb225e121508ebfcf6a8b8 (diff)
downloadFreeBSD-ports-c554a974657fe46888241ff9b078de51f10e1be4.zip
FreeBSD-ports-c554a974657fe46888241ff9b078de51f10e1be4.tar.gz
upgrade netsaint -> 0.0.7b4, netsaint-plugins -> 1.2.9.4
change maintainer email address PR: 27012, 27013 Submitted by: MAINTAINER
-rw-r--r--net-mgmt/nagios-plugins/Makefile10
-rw-r--r--net-mgmt/nagios-plugins/distinfo2
-rw-r--r--net-mgmt/nagios-plugins/files/patch-ab41
-rw-r--r--net-mgmt/nagios-plugins/files/patch-ac13
-rw-r--r--net-mgmt/nagios-plugins/pkg-plist2
-rw-r--r--net-mgmt/nagios-plugins/scripts/configure2
-rw-r--r--net-mgmt/nagios-plugins/scripts/createuser49
-rw-r--r--net-mgmt/nagios/Makefile8
-rw-r--r--net-mgmt/nagios/distinfo2
-rw-r--r--net-mgmt/nagios/files/patch-aa11
-rw-r--r--net-mgmt/nagios/files/patch-ae10
-rw-r--r--net-mgmt/nagios/files/patch-ai8
-rw-r--r--net-mgmt/nagios/pkg-install68
-rw-r--r--net-mgmt/nagios/pkg-plist3
-rw-r--r--net-mgmt/nagios/scripts/createuser49
-rw-r--r--net-mgmt/nagios12/Makefile8
-rw-r--r--net-mgmt/nagios12/distinfo2
-rw-r--r--net-mgmt/nagios12/files/patch-aa11
-rw-r--r--net-mgmt/nagios12/files/patch-ae10
-rw-r--r--net-mgmt/nagios12/files/patch-ai8
-rw-r--r--net-mgmt/nagios12/pkg-install68
-rw-r--r--net-mgmt/nagios12/pkg-plist3
-rw-r--r--net-mgmt/nagios12/scripts/createuser49
-rw-r--r--net-mgmt/nagios2/Makefile8
-rw-r--r--net-mgmt/nagios2/distinfo2
-rw-r--r--net-mgmt/nagios2/files/patch-aa11
-rw-r--r--net-mgmt/nagios2/files/patch-ae10
-rw-r--r--net-mgmt/nagios2/files/patch-ai8
-rw-r--r--net-mgmt/nagios2/pkg-install68
-rw-r--r--net-mgmt/nagios2/pkg-plist3
-rw-r--r--net-mgmt/nagios2/scripts/createuser49
-rw-r--r--net-mgmt/netsaint-plugins/Makefile10
-rw-r--r--net-mgmt/netsaint-plugins/distinfo2
-rw-r--r--net-mgmt/netsaint-plugins/files/patch-ab41
-rw-r--r--net-mgmt/netsaint-plugins/files/patch-ac13
-rw-r--r--net-mgmt/netsaint-plugins/pkg-plist2
-rw-r--r--net-mgmt/netsaint-plugins/scripts/configure2
-rw-r--r--net-mgmt/netsaint-plugins/scripts/createuser49
-rw-r--r--net-mgmt/netsaint/Makefile8
-rw-r--r--net-mgmt/netsaint/distinfo2
-rw-r--r--net-mgmt/netsaint/files/patch-aa11
-rw-r--r--net-mgmt/netsaint/files/patch-ae10
-rw-r--r--net-mgmt/netsaint/files/patch-ai8
-rw-r--r--net-mgmt/netsaint/pkg-install68
-rw-r--r--net-mgmt/netsaint/pkg-plist3
-rw-r--r--net-mgmt/netsaint/scripts/createuser49
-rw-r--r--net/nagios-plugins/Makefile10
-rw-r--r--net/nagios-plugins/distinfo2
-rw-r--r--net/nagios-plugins/files/patch-ab41
-rw-r--r--net/nagios-plugins/files/patch-ac13
-rw-r--r--net/nagios-plugins/pkg-plist2
-rw-r--r--net/nagios-plugins/scripts/configure2
-rw-r--r--net/nagios-plugins/scripts/createuser49
-rw-r--r--net/nagios/Makefile8
-rw-r--r--net/nagios/distinfo2
-rw-r--r--net/nagios/files/patch-aa11
-rw-r--r--net/nagios/files/patch-ae10
-rw-r--r--net/nagios/files/patch-ai8
-rw-r--r--net/nagios/pkg-install68
-rw-r--r--net/nagios/pkg-plist3
-rw-r--r--net/nagios/scripts/createuser49
-rw-r--r--net/netsaint-plugins/Makefile10
-rw-r--r--net/netsaint-plugins/distinfo2
-rw-r--r--net/netsaint-plugins/files/patch-ab41
-rw-r--r--net/netsaint-plugins/files/patch-ac13
-rw-r--r--net/netsaint-plugins/pkg-plist2
-rw-r--r--net/netsaint-plugins/scripts/configure2
-rw-r--r--net/netsaint-plugins/scripts/createuser49
-rw-r--r--net/netsaint/Makefile8
-rw-r--r--net/netsaint/distinfo2
-rw-r--r--net/netsaint/files/patch-aa11
-rw-r--r--net/netsaint/files/patch-ae10
-rw-r--r--net/netsaint/files/patch-ai8
-rw-r--r--net/netsaint/pkg-install68
-rw-r--r--net/netsaint/pkg-plist3
-rw-r--r--net/netsaint/scripts/createuser49
76 files changed, 712 insertions, 718 deletions
diff --git a/net-mgmt/nagios-plugins/Makefile b/net-mgmt/nagios-plugins/Makefile
index 6d84d42..e51dcaa 100644
--- a/net-mgmt/nagios-plugins/Makefile
+++ b/net-mgmt/nagios-plugins/Makefile
@@ -6,13 +6,12 @@
#
PORTNAME= netsaint-plugins
-PORTVERSION= 1.2.9.3
-PORTREVISION= 2
+PORTVERSION= 1.2.9.4
CATEGORIES= net
MASTER_SITES= http://download.sourceforge.net/netsaintplug/
-DISTNAME= ${PORTNAME}-1.2.9-3
+DISTNAME= ${PORTNAME}-1.2.9-4
-MAINTAINER= blaz@amis.net
+MAINTAINER= blaz@si.FreeBSD.org
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --sbindir=${PREFIX}/share/netsaint/sbin \
@@ -31,9 +30,6 @@ pre-fetch:
.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc"
.endif
-pre-install:
- ${PERL} ${SCRIPTDIR}/createuser
-
post-clean:
@${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc
diff --git a/net-mgmt/nagios-plugins/distinfo b/net-mgmt/nagios-plugins/distinfo
index 57e3a22..f83d420 100644
--- a/net-mgmt/nagios-plugins/distinfo
+++ b/net-mgmt/nagios-plugins/distinfo
@@ -1 +1 @@
-MD5 (netsaint-plugins-1.2.9-3.tar.gz) = 2e9928dcb1d522144ba0bb9a98619035
+MD5 (netsaint-plugins-1.2.9-4.tar.gz) = ef4adb2b9e77abebd3797e5ebe093014
diff --git a/net-mgmt/nagios-plugins/files/patch-ab b/net-mgmt/nagios-plugins/files/patch-ab
index 4d27df5..126c8b0 100644
--- a/net-mgmt/nagios-plugins/files/patch-ab
+++ b/net-mgmt/nagios-plugins/files/patch-ab
@@ -1,5 +1,5 @@
---- configure.in.orig Tue Mar 6 06:40:44 2001
-+++ configure.in Mon Apr 16 12:24:22 2001
+--- configure.in.orig Thu Apr 26 16:00:26 2001
++++ configure.in Tue May 1 18:28:01 2001
@@ -7,7 +7,7 @@
dnl AM_INIT_AUTOMAKE(netsaint-plugins,$VERSION)
AM_CONFIG_HEADER(plugins/config.h plugins/common.h plugins/version.h plugins/netutils.h plugins/utils.h plugins/popen.h)
@@ -9,7 +9,18 @@
dnl Figure out how to invoke "install" and what install options to use.
-@@ -126,25 +126,37 @@
+@@ -99,8 +99,8 @@
+ AC_CHECK_HEADERS(postgresql/libpq-fe.h)
+ AC_CHECK_HEADERS(libpq-fe.h)
+ if test "$ac_cv_header_pgsql_libpq_fe_h" = "yes"; then
+- PGLIBS="-lpq -lcrypt"
+- PGINCLUDE="-I/usr/include/pgsql"
++ PGLIBS="-L$PGSQL/lib -lpq -lcrypt"
++ PGINCLUDE="-I$PGSQL/include/pgsql"
+ elif test "$ac_cv_header_postgresql_libpq_fe_h" = "yes"; then
+ PGLIBS="-L$PGSQL/lib -lpq -lcrypt"
+ PGINCLUDE="-I/usr/include/postgresql"
+@@ -128,25 +128,37 @@
LIBS="$_SAVEDLIBS"
CPPFLAGS="$_SAVEDCPPFLAGS"
@@ -53,7 +64,7 @@
AC_SUBST(LDAPLIBS)
AC_SUBST(LDAPINCLUDE)
EXTRAS="$EXTRAS check_ldap"
-@@ -153,13 +165,14 @@
+@@ -155,13 +167,14 @@
AC_MSG_WARN([install LDAP libs to compile this plugin (see Requirements).])
fi
LIBS="$_SAVEDLIBS"
@@ -70,7 +81,7 @@
AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz" check_mysql_LDFLAGS="-L$MYSQLLIBDIR",,-L$MYSQLLIBDIR -lz)
elif test -f /usr/lib/libmysqlclient.so; then
AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz",,-lz)
-@@ -175,7 +188,8 @@
+@@ -177,7 +190,8 @@
AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient" check_mysql_LDFLAGS="-L/usr/lib/mysql",,-L/usr/lib/mysql)
fi
if test "$ac_cv_lib_mysqlclient_mysql_init" = "yes" -o "$ac_cv_lib_mysqlclient_mysql_close" = "yes"; then
@@ -80,7 +91,7 @@
if test "$ac_cv_header_mysql_mysql_h" = "yes" -a "$ac_cv_header_mysql_errmsg_h" = "yes"; then
EXTRAS="$EXTRAS check_mysql"
AC_SUBST(MYSQLLIBS)
-@@ -189,7 +203,7 @@
+@@ -191,7 +205,7 @@
AC_MSG_WARN([install mysql client libs to compile this plugin (see Requirements).])
fi
LIBS="$_SAVEDLIBS"
@@ -89,7 +100,7 @@
dnl Check for OpenSSL location
AC_PATH_PROG(OPENSSL,openssl)
-@@ -268,16 +282,16 @@
+@@ -270,16 +284,16 @@
dnl AC_SUBST(libgetopt_a_DEPENDENCIES)
dnl AC_SUBST(libsnprintf_a_SOURCES)
@@ -115,7 +126,7 @@
AC_CHECK_FUNC(vsnprintf,,LIBS="$LIBS -lsnprintf" DEPLIBS="$DEPLIBS libsnprintf.a")
-@@ -328,72 +342,72 @@
+@@ -330,72 +344,72 @@
AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -eo 'rss comm'")
AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s")
echo " ps syntax... $PATH_TO_PS -eo 's comm vsz rss user ppid args'"
@@ -204,7 +215,7 @@
AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS waxo 'state uid ppid command'")
EXTRAS="$EXTRAS check_netsaint"
- AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS waxco 'state uid ppid command command'")
-+ AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS waxo 'state uid ppid command command'")
++ AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS waxo 'state uid ppid command'")
AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n")
- AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS waxco 'vsz command'")
+ AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS waxo 'vsz command'")
@@ -217,7 +228,7 @@
dnl BSD-like mode in RH 6.1
elif [ps waxno 'state comm vsz rss uid user ppid args' 2>/dev/null | egrep -i "^S +COMMAND +VSZ +RSS +UID +USER +PPID +[RGSCOMDNA]+" >/dev/null]
then
-@@ -407,7 +421,7 @@
+@@ -409,7 +423,7 @@
AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s")
AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS waxno 'rss comm'")
AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s")
@@ -226,7 +237,7 @@
dnl IRIX 53
elif [ps -el 2>/dev/null | egrep -i "^ *F +S +UID +PID +PPID +C +PRI +NI +P +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+" >/dev/null]
then
-@@ -618,6 +632,8 @@
+@@ -620,6 +634,8 @@
AC_DEFINE_UNQUOTED(WHO_COMMAND,"$PATH_TO_WHO")
fi
@@ -235,7 +246,7 @@
AC_PATH_PROG(PATH_TO_SNMPGET,snmpget)
if test -f "$PATH_TO_SNMPGET"
then
-@@ -626,6 +642,7 @@
+@@ -628,6 +644,7 @@
else
echo "** Get snmpget from http://ucd-snmp.ucdavis.edu to make check_hpjd and check_snmp plugins"
fi
@@ -243,7 +254,7 @@
AC_PATH_PROG(PATH_TO_SNMPGETNEXT,snmpgetnext)
if test -f "$PATH_TO_SNMPGETNEXT"
-@@ -633,6 +650,8 @@
+@@ -635,6 +652,8 @@
AC_DEFINE_UNQUOTED(PATH_TO_SNMPGETNEXT,"$PATH_TO_SNMPGETNEXT")
fi
@@ -252,7 +263,7 @@
AC_PATH_PROG(PATH_TO_QUAKESTAT,quakestat)
AC_PATH_PROG(PATH_TO_QSTAT,qstat)
if test -n "$PATH_TO_QUAKESTAT"
-@@ -646,7 +665,10 @@
+@@ -648,7 +667,10 @@
else
echo "** Get qstat from http://www.activesw.com/people/steve/qstat.html in order to make check_game plugin"
fi
@@ -263,7 +274,7 @@
AC_PATH_PROG(PATH_TO_FPING,fping)
if test -n "$PATH_TO_FPING"
then
-@@ -654,6 +676,7 @@
+@@ -656,6 +678,7 @@
EXTRAS="$EXTRAS check_fping"
else
echo "** Get fping from http://www.stanford.edu/~schemers/docs/fping/fping.html in order to make check_fping plugin"
diff --git a/net-mgmt/nagios-plugins/files/patch-ac b/net-mgmt/nagios-plugins/files/patch-ac
index 994cda9..796ee76 100644
--- a/net-mgmt/nagios-plugins/files/patch-ac
+++ b/net-mgmt/nagios-plugins/files/patch-ac
@@ -1,11 +1,12 @@
---- plugins-scripts/check_ntp.pl.orig Mon Aug 28 17:00:59 2000
-+++ plugins-scripts/check_ntp.pl Mon Apr 9 19:37:32 2001
-@@ -153,7 +153,7 @@
+--- plugins-scripts/check_ntp.pl.orig Mon Apr 23 19:43:00 2001
++++ plugins-scripts/check_ntp.pl Sun Apr 29 18:38:26 2001
+@@ -154,7 +154,8 @@
###
###
--if (#open(NTPDC,"/usr/sbin/ntpdc -c $host 2>&1 |") ||
-+if (open(NTPDC,"/usr/sbin/ntpdc -c $host 2>&1 |") ||
- open(NTPDC,"/usr/sbin/xntpdc -c $host 2>&1 |") ) {
+-if (open(NTPDC,"/usr/sbin/xntpdc -c peers $host 2>&1 |") ) {
++if (open(NTPDC,"/usr/sbin/xntpdc -c peers $host 2>&1 |") ||
++ open(NTPDC,"/usr/sbin/ntpdc -c peers $host 2>&1 |")) {
while (<NTPDC>) {
print if ($verbose);
+ if (/([^\s]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)/) {
diff --git a/net-mgmt/nagios-plugins/pkg-plist b/net-mgmt/nagios-plugins/pkg-plist
index dad66c5..2fc8569 100644
--- a/net-mgmt/nagios-plugins/pkg-plist
+++ b/net-mgmt/nagios-plugins/pkg-plist
@@ -19,8 +19,10 @@ libexec/netsaint/check_log
libexec/netsaint/check_mrtg
libexec/netsaint/check_mrtgtraf
%%SUB_MYSQL%%libexec/netsaint/check_mysql
+libexec/netsaint/check_netdns
libexec/netsaint/check_netsaint
libexec/netsaint/check_nntp
+libexec/netsaint/check_nt
libexec/netsaint/check_ntp
libexec/netsaint/check_nwstat
libexec/netsaint/check_oracle
diff --git a/net-mgmt/nagios-plugins/scripts/configure b/net-mgmt/nagios-plugins/scripts/configure
index efb8303..1a17d8f 100644
--- a/net-mgmt/nagios-plugins/scripts/configure
+++ b/net-mgmt/nagios-plugins/scripts/configure
@@ -81,7 +81,7 @@ while [ "$1" ]; do
;;
\"PostgreSQL\")
echo "LIB_DEPENDS+= pq.2:\${PORTSDIR}/databases/postgresql7"
- echo "CONFIGURE_ARGS+= --with-pgsql=\${LOCALBASE}/pgsql"
+ echo "CONFIGURE_ARGS+= --with-pgsql=\${LOCALBASE}"
SUB_PGSQL=""
;;
\"OpenLDAP\")
diff --git a/net-mgmt/nagios-plugins/scripts/createuser b/net-mgmt/nagios-plugins/scripts/createuser
deleted file mode 100644
index 0ebde3c..0000000
--- a/net-mgmt/nagios-plugins/scripts/createuser
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/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:/var/netsaint:/sbin/nologin\"" );
-
-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 );
-}
diff --git a/net-mgmt/nagios/Makefile b/net-mgmt/nagios/Makefile
index dc57265..05a8c85 100644
--- a/net-mgmt/nagios/Makefile
+++ b/net-mgmt/nagios/Makefile
@@ -6,11 +6,11 @@
#
PORTNAME= netsaint
-PORTVERSION= 0.0.7b3
+PORTVERSION= 0.0.7b4
CATEGORIES= net
MASTER_SITES= http://netsaint.sourceforge.net/download/
-MAINTAINER= blaz@amis.net
+MAINTAINER= blaz@si.FreeBSD.org
LIB_DEPENDS= gd.2:${PORTSDIR}/graphics/gd \
gnugetopt.1:${PORTSDIR}/devel/libgnugetopt
@@ -20,7 +20,7 @@ GNU_CONFIGURE= yes
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
LIBS="-L${LOCALBASE}/lib -lgd -lgnugetopt"
-CONFIGURE_ARGS= --with-command-user=nobody \
+CONFIGURE_ARGS= --with-command-user=netsaint \
--with-command-grp=nogroup \
--with-netsaint-user=netsaint \
--with-netsaint-grp=netsaint \
@@ -36,6 +36,6 @@ pre-fetch:
@${SH} ${SCRIPTDIR}/checkps
pre-install:
- ${PERL} ${SCRIPTDIR}/createuser
+ @PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
.include <bsd.port.mk>
diff --git a/net-mgmt/nagios/distinfo b/net-mgmt/nagios/distinfo
index ebfae03..0fc5dd9 100644
--- a/net-mgmt/nagios/distinfo
+++ b/net-mgmt/nagios/distinfo
@@ -1 +1 @@
-MD5 (netsaint-0.0.7b3.tar.gz) = b21ed67a86266b021037f46c78c5900f
+MD5 (netsaint-0.0.7b4.tar.gz) = d718507bb3a9cb24e6754440acc76b24
diff --git a/net-mgmt/nagios/files/patch-aa b/net-mgmt/nagios/files/patch-aa
index e106d0e..52e4d17 100644
--- a/net-mgmt/nagios/files/patch-aa
+++ b/net-mgmt/nagios/files/patch-aa
@@ -1,5 +1,5 @@
---- Makefile.in.orig Thu Mar 1 05:49:19 2001
-+++ Makefile.in Tue Apr 3 10:02:31 2001
+--- Makefile.in.orig Mon Apr 30 17:22:35 2001
++++ Makefile.in Tue May 1 19:58:50 2001
@@ -27,7 +27,7 @@
INSTALL_OPTS=@INSTALL_OPTS@
COMMAND_OPTS=@COMMAND_OPTS@
@@ -9,7 +9,7 @@
CGICFGDIR=$(CGIDIR)
PERLDIR=@PERLDIR@
-@@ -99,16 +99,16 @@
+@@ -99,20 +99,20 @@
install-config:
$(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)
@@ -32,3 +32,8 @@
install-commandmode:
$(INSTALL) -m 775 $(COMMAND_OPTS) -d $(DESTDIR)$(LOGDIR)/rw
+- chmod g+s $(DESTDIR)$(LOGDIR)/rw
++# chmod g+s $(DESTDIR)$(LOGDIR)/rw
+
+ fullinstall: install install-init install-commandmode
+
diff --git a/net-mgmt/nagios/files/patch-ae b/net-mgmt/nagios/files/patch-ae
index 6cbf9e2..37f2c6d 100644
--- a/net-mgmt/nagios/files/patch-ae
+++ b/net-mgmt/nagios/files/patch-ae
@@ -1,11 +1,11 @@
---- configure.in Fri Apr 7 11:11:34 2000
-+++ configure.in.new Mon Jun 5 16:09:21 2000
+--- configure.in.orig Mon Apr 30 17:22:35 2001
++++ configure.in Tue May 1 19:36:54 2001
@@ -1,7 +1,7 @@
- dnl Process this file with autoconf to produce a configure script.
+ dnl Process this -*-m4-*- 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_CONFIG_HEADER(common/config.h common/snprintf.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.
-
+ AC_PROG_INSTALL
diff --git a/net-mgmt/nagios/files/patch-ai b/net-mgmt/nagios/files/patch-ai
index ef3b63b..1820da9 100644
--- a/net-mgmt/nagios/files/patch-ai
+++ b/net-mgmt/nagios/files/patch-ai
@@ -1,5 +1,5 @@
---- daemon-init.in.orig Sun Feb 18 23:33:21 2001
-+++ daemon-init.in Tue Apr 3 20:58:18 2001
+--- daemon-init.in.orig Sat Mar 24 19:58:26 2001
++++ daemon-init.in Tue May 1 19:38:52 2001
@@ -68,12 +68,9 @@
@@ -16,12 +16,12 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
-@@ -101,7 +98,7 @@
+@@ -102,7 +99,7 @@
start)
echo "Starting network monitor: netsaint"
- su $Netsaint -c "touch $NetsaintVar/netsaint.log $NetsaintSav"
+ su -m $Netsaint -c "touch $NetsaintVar/netsaint.log $NetsaintSav"
+ rm -f $NetsaintCmd
$NetsaintBin -d $NetsaintCfg
if [ -d $NetsaintLckDir ]; then touch $NetsaintLckDir/$NetsaintLckFile; fi
- sleep 1
diff --git a/net-mgmt/nagios/pkg-install b/net-mgmt/nagios/pkg-install
new file mode 100644
index 0000000..52af9cc
--- /dev/null
+++ b/net-mgmt/nagios/pkg-install
@@ -0,0 +1,68 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+PKG_PREFIX=${PKG_PREFIX:=/usr/local}
+
+user=netsaint
+group=netsaint
+
+ask() {
+ local question default answer
+
+ question=$1
+ default=$2
+ if [ -z "${PACKAGE_BUILDING}" ]; then
+ read -p "${question} [${default}]? " answer
+ fi
+ if [ x${answer} = x ]; then
+ answer=${default}
+ fi
+ echo ${answer}
+}
+
+yesno() {
+ local dflt question answer
+
+ question=$1
+ dflt=$2
+ while :; do
+ answer=$(ask "${question}" "${dflt}")
+ case "${answer}" in
+ [Yy]*) return 0;;
+ [Nn]*) return 1;;
+ esac
+ echo "Please answer yes or no."
+ done
+}
+
+if [ x"$2" = xPRE-INSTALL ]; then
+ if /usr/sbin/pw groupshow "${group}" 2>/dev/null; then
+ echo "You already have a group \"${group}\", so I will use it."
+ else
+ echo "You need a group \"${group}\"."
+ if yesno "Would you like me to create it" y; then
+ /usr/sbin/pw groupadd ${group} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+ fi
+
+ if /usr/sbin/pw user show "${user}" 2>/dev/null; then
+ echo "You already have a user \"${user}\", so I will use it."
+ else
+ echo "You need a user \"${user}\"."
+ if yesno "Would you like me to create it" y; then
+ /usr/sbin/pw useradd ${user} -g ${group} -h - -d ${PKG_PREFIX}/var/netsaint \
+ -s /nonexistent -c "Netsaint pseudo-user" || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+ fi
+
+fi
diff --git a/net-mgmt/nagios/pkg-plist b/net-mgmt/nagios/pkg-plist
index d71e872..fd71eef 100644
--- a/net-mgmt/nagios/pkg-plist
+++ b/net-mgmt/nagios/pkg-plist
@@ -2,7 +2,7 @@
@exec mkdir -p %D/var/netsaint/rw
@exec chmod 775 %D/var/netsaint %D/var/netsaint/archives %D/var/netsaint/rw
@exec chown netsaint:netsaint %D/var/netsaint %D/var/netsaint/archives
-@exec chown nobody:nogroup %D/var/netsaint/rw
+@exec chown netsaint:nogroup %D/var/netsaint/rw
bin/netsaint
etc/netsaint/commands.cfg.dist
etc/netsaint/hosts.cfg.dist
@@ -291,3 +291,4 @@ share/netsaint/stylesheets/trends.css
@unexec rmdir %D/var/netsaint/archives 2>/dev/null || true
@unexec rmdir %D/var/netsaint/rw 2>/dev/null || true
@unexec rmdir %D/var/netsaint 2>/dev/null || true
+@unexec rmdir %D/var 2>/dev/null || true
diff --git a/net-mgmt/nagios/scripts/createuser b/net-mgmt/nagios/scripts/createuser
deleted file mode 100644
index 0ebde3c..0000000
--- a/net-mgmt/nagios/scripts/createuser
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/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:/var/netsaint:/sbin/nologin\"" );
-
-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 );
-}
diff --git a/net-mgmt/nagios12/Makefile b/net-mgmt/nagios12/Makefile
index dc57265..05a8c85 100644
--- a/net-mgmt/nagios12/Makefile
+++ b/net-mgmt/nagios12/Makefile
@@ -6,11 +6,11 @@
#
PORTNAME= netsaint
-PORTVERSION= 0.0.7b3
+PORTVERSION= 0.0.7b4
CATEGORIES= net
MASTER_SITES= http://netsaint.sourceforge.net/download/
-MAINTAINER= blaz@amis.net
+MAINTAINER= blaz@si.FreeBSD.org
LIB_DEPENDS= gd.2:${PORTSDIR}/graphics/gd \
gnugetopt.1:${PORTSDIR}/devel/libgnugetopt
@@ -20,7 +20,7 @@ GNU_CONFIGURE= yes
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
LIBS="-L${LOCALBASE}/lib -lgd -lgnugetopt"
-CONFIGURE_ARGS= --with-command-user=nobody \
+CONFIGURE_ARGS= --with-command-user=netsaint \
--with-command-grp=nogroup \
--with-netsaint-user=netsaint \
--with-netsaint-grp=netsaint \
@@ -36,6 +36,6 @@ pre-fetch:
@${SH} ${SCRIPTDIR}/checkps
pre-install:
- ${PERL} ${SCRIPTDIR}/createuser
+ @PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
.include <bsd.port.mk>
diff --git a/net-mgmt/nagios12/distinfo b/net-mgmt/nagios12/distinfo
index ebfae03..0fc5dd9 100644
--- a/net-mgmt/nagios12/distinfo
+++ b/net-mgmt/nagios12/distinfo
@@ -1 +1 @@
-MD5 (netsaint-0.0.7b3.tar.gz) = b21ed67a86266b021037f46c78c5900f
+MD5 (netsaint-0.0.7b4.tar.gz) = d718507bb3a9cb24e6754440acc76b24
diff --git a/net-mgmt/nagios12/files/patch-aa b/net-mgmt/nagios12/files/patch-aa
index e106d0e..52e4d17 100644
--- a/net-mgmt/nagios12/files/patch-aa
+++ b/net-mgmt/nagios12/files/patch-aa
@@ -1,5 +1,5 @@
---- Makefile.in.orig Thu Mar 1 05:49:19 2001
-+++ Makefile.in Tue Apr 3 10:02:31 2001
+--- Makefile.in.orig Mon Apr 30 17:22:35 2001
++++ Makefile.in Tue May 1 19:58:50 2001
@@ -27,7 +27,7 @@
INSTALL_OPTS=@INSTALL_OPTS@
COMMAND_OPTS=@COMMAND_OPTS@
@@ -9,7 +9,7 @@
CGICFGDIR=$(CGIDIR)
PERLDIR=@PERLDIR@
-@@ -99,16 +99,16 @@
+@@ -99,20 +99,20 @@
install-config:
$(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)
@@ -32,3 +32,8 @@
install-commandmode:
$(INSTALL) -m 775 $(COMMAND_OPTS) -d $(DESTDIR)$(LOGDIR)/rw
+- chmod g+s $(DESTDIR)$(LOGDIR)/rw
++# chmod g+s $(DESTDIR)$(LOGDIR)/rw
+
+ fullinstall: install install-init install-commandmode
+
diff --git a/net-mgmt/nagios12/files/patch-ae b/net-mgmt/nagios12/files/patch-ae
index 6cbf9e2..37f2c6d 100644
--- a/net-mgmt/nagios12/files/patch-ae
+++ b/net-mgmt/nagios12/files/patch-ae
@@ -1,11 +1,11 @@
---- configure.in Fri Apr 7 11:11:34 2000
-+++ configure.in.new Mon Jun 5 16:09:21 2000
+--- configure.in.orig Mon Apr 30 17:22:35 2001
++++ configure.in Tue May 1 19:36:54 2001
@@ -1,7 +1,7 @@
- dnl Process this file with autoconf to produce a configure script.
+ dnl Process this -*-m4-*- 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_CONFIG_HEADER(common/config.h common/snprintf.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.
-
+ AC_PROG_INSTALL
diff --git a/net-mgmt/nagios12/files/patch-ai b/net-mgmt/nagios12/files/patch-ai
index ef3b63b..1820da9 100644
--- a/net-mgmt/nagios12/files/patch-ai
+++ b/net-mgmt/nagios12/files/patch-ai
@@ -1,5 +1,5 @@
---- daemon-init.in.orig Sun Feb 18 23:33:21 2001
-+++ daemon-init.in Tue Apr 3 20:58:18 2001
+--- daemon-init.in.orig Sat Mar 24 19:58:26 2001
++++ daemon-init.in Tue May 1 19:38:52 2001
@@ -68,12 +68,9 @@
@@ -16,12 +16,12 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
-@@ -101,7 +98,7 @@
+@@ -102,7 +99,7 @@
start)
echo "Starting network monitor: netsaint"
- su $Netsaint -c "touch $NetsaintVar/netsaint.log $NetsaintSav"
+ su -m $Netsaint -c "touch $NetsaintVar/netsaint.log $NetsaintSav"
+ rm -f $NetsaintCmd
$NetsaintBin -d $NetsaintCfg
if [ -d $NetsaintLckDir ]; then touch $NetsaintLckDir/$NetsaintLckFile; fi
- sleep 1
diff --git a/net-mgmt/nagios12/pkg-install b/net-mgmt/nagios12/pkg-install
new file mode 100644
index 0000000..52af9cc
--- /dev/null
+++ b/net-mgmt/nagios12/pkg-install
@@ -0,0 +1,68 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+PKG_PREFIX=${PKG_PREFIX:=/usr/local}
+
+user=netsaint
+group=netsaint
+
+ask() {
+ local question default answer
+
+ question=$1
+ default=$2
+ if [ -z "${PACKAGE_BUILDING}" ]; then
+ read -p "${question} [${default}]? " answer
+ fi
+ if [ x${answer} = x ]; then
+ answer=${default}
+ fi
+ echo ${answer}
+}
+
+yesno() {
+ local dflt question answer
+
+ question=$1
+ dflt=$2
+ while :; do
+ answer=$(ask "${question}" "${dflt}")
+ case "${answer}" in
+ [Yy]*) return 0;;
+ [Nn]*) return 1;;
+ esac
+ echo "Please answer yes or no."
+ done
+}
+
+if [ x"$2" = xPRE-INSTALL ]; then
+ if /usr/sbin/pw groupshow "${group}" 2>/dev/null; then
+ echo "You already have a group \"${group}\", so I will use it."
+ else
+ echo "You need a group \"${group}\"."
+ if yesno "Would you like me to create it" y; then
+ /usr/sbin/pw groupadd ${group} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+ fi
+
+ if /usr/sbin/pw user show "${user}" 2>/dev/null; then
+ echo "You already have a user \"${user}\", so I will use it."
+ else
+ echo "You need a user \"${user}\"."
+ if yesno "Would you like me to create it" y; then
+ /usr/sbin/pw useradd ${user} -g ${group} -h - -d ${PKG_PREFIX}/var/netsaint \
+ -s /nonexistent -c "Netsaint pseudo-user" || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+ fi
+
+fi
diff --git a/net-mgmt/nagios12/pkg-plist b/net-mgmt/nagios12/pkg-plist
index d71e872..fd71eef 100644
--- a/net-mgmt/nagios12/pkg-plist
+++ b/net-mgmt/nagios12/pkg-plist
@@ -2,7 +2,7 @@
@exec mkdir -p %D/var/netsaint/rw
@exec chmod 775 %D/var/netsaint %D/var/netsaint/archives %D/var/netsaint/rw
@exec chown netsaint:netsaint %D/var/netsaint %D/var/netsaint/archives
-@exec chown nobody:nogroup %D/var/netsaint/rw
+@exec chown netsaint:nogroup %D/var/netsaint/rw
bin/netsaint
etc/netsaint/commands.cfg.dist
etc/netsaint/hosts.cfg.dist
@@ -291,3 +291,4 @@ share/netsaint/stylesheets/trends.css
@unexec rmdir %D/var/netsaint/archives 2>/dev/null || true
@unexec rmdir %D/var/netsaint/rw 2>/dev/null || true
@unexec rmdir %D/var/netsaint 2>/dev/null || true
+@unexec rmdir %D/var 2>/dev/null || true
diff --git a/net-mgmt/nagios12/scripts/createuser b/net-mgmt/nagios12/scripts/createuser
deleted file mode 100644
index 0ebde3c..0000000
--- a/net-mgmt/nagios12/scripts/createuser
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/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:/var/netsaint:/sbin/nologin\"" );
-
-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 );
-}
diff --git a/net-mgmt/nagios2/Makefile b/net-mgmt/nagios2/Makefile
index dc57265..05a8c85 100644
--- a/net-mgmt/nagios2/Makefile
+++ b/net-mgmt/nagios2/Makefile
@@ -6,11 +6,11 @@
#
PORTNAME= netsaint
-PORTVERSION= 0.0.7b3
+PORTVERSION= 0.0.7b4
CATEGORIES= net
MASTER_SITES= http://netsaint.sourceforge.net/download/
-MAINTAINER= blaz@amis.net
+MAINTAINER= blaz@si.FreeBSD.org
LIB_DEPENDS= gd.2:${PORTSDIR}/graphics/gd \
gnugetopt.1:${PORTSDIR}/devel/libgnugetopt
@@ -20,7 +20,7 @@ GNU_CONFIGURE= yes
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
LIBS="-L${LOCALBASE}/lib -lgd -lgnugetopt"
-CONFIGURE_ARGS= --with-command-user=nobody \
+CONFIGURE_ARGS= --with-command-user=netsaint \
--with-command-grp=nogroup \
--with-netsaint-user=netsaint \
--with-netsaint-grp=netsaint \
@@ -36,6 +36,6 @@ pre-fetch:
@${SH} ${SCRIPTDIR}/checkps
pre-install:
- ${PERL} ${SCRIPTDIR}/createuser
+ @PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
.include <bsd.port.mk>
diff --git a/net-mgmt/nagios2/distinfo b/net-mgmt/nagios2/distinfo
index ebfae03..0fc5dd9 100644
--- a/net-mgmt/nagios2/distinfo
+++ b/net-mgmt/nagios2/distinfo
@@ -1 +1 @@
-MD5 (netsaint-0.0.7b3.tar.gz) = b21ed67a86266b021037f46c78c5900f
+MD5 (netsaint-0.0.7b4.tar.gz) = d718507bb3a9cb24e6754440acc76b24
diff --git a/net-mgmt/nagios2/files/patch-aa b/net-mgmt/nagios2/files/patch-aa
index e106d0e..52e4d17 100644
--- a/net-mgmt/nagios2/files/patch-aa
+++ b/net-mgmt/nagios2/files/patch-aa
@@ -1,5 +1,5 @@
---- Makefile.in.orig Thu Mar 1 05:49:19 2001
-+++ Makefile.in Tue Apr 3 10:02:31 2001
+--- Makefile.in.orig Mon Apr 30 17:22:35 2001
++++ Makefile.in Tue May 1 19:58:50 2001
@@ -27,7 +27,7 @@
INSTALL_OPTS=@INSTALL_OPTS@
COMMAND_OPTS=@COMMAND_OPTS@
@@ -9,7 +9,7 @@
CGICFGDIR=$(CGIDIR)
PERLDIR=@PERLDIR@
-@@ -99,16 +99,16 @@
+@@ -99,20 +99,20 @@
install-config:
$(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)
@@ -32,3 +32,8 @@
install-commandmode:
$(INSTALL) -m 775 $(COMMAND_OPTS) -d $(DESTDIR)$(LOGDIR)/rw
+- chmod g+s $(DESTDIR)$(LOGDIR)/rw
++# chmod g+s $(DESTDIR)$(LOGDIR)/rw
+
+ fullinstall: install install-init install-commandmode
+
diff --git a/net-mgmt/nagios2/files/patch-ae b/net-mgmt/nagios2/files/patch-ae
index 6cbf9e2..37f2c6d 100644
--- a/net-mgmt/nagios2/files/patch-ae
+++ b/net-mgmt/nagios2/files/patch-ae
@@ -1,11 +1,11 @@
---- configure.in Fri Apr 7 11:11:34 2000
-+++ configure.in.new Mon Jun 5 16:09:21 2000
+--- configure.in.orig Mon Apr 30 17:22:35 2001
++++ configure.in Tue May 1 19:36:54 2001
@@ -1,7 +1,7 @@
- dnl Process this file with autoconf to produce a configure script.
+ dnl Process this -*-m4-*- 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_CONFIG_HEADER(common/config.h common/snprintf.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.
-
+ AC_PROG_INSTALL
diff --git a/net-mgmt/nagios2/files/patch-ai b/net-mgmt/nagios2/files/patch-ai
index ef3b63b..1820da9 100644
--- a/net-mgmt/nagios2/files/patch-ai
+++ b/net-mgmt/nagios2/files/patch-ai
@@ -1,5 +1,5 @@
---- daemon-init.in.orig Sun Feb 18 23:33:21 2001
-+++ daemon-init.in Tue Apr 3 20:58:18 2001
+--- daemon-init.in.orig Sat Mar 24 19:58:26 2001
++++ daemon-init.in Tue May 1 19:38:52 2001
@@ -68,12 +68,9 @@
@@ -16,12 +16,12 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
-@@ -101,7 +98,7 @@
+@@ -102,7 +99,7 @@
start)
echo "Starting network monitor: netsaint"
- su $Netsaint -c "touch $NetsaintVar/netsaint.log $NetsaintSav"
+ su -m $Netsaint -c "touch $NetsaintVar/netsaint.log $NetsaintSav"
+ rm -f $NetsaintCmd
$NetsaintBin -d $NetsaintCfg
if [ -d $NetsaintLckDir ]; then touch $NetsaintLckDir/$NetsaintLckFile; fi
- sleep 1
diff --git a/net-mgmt/nagios2/pkg-install b/net-mgmt/nagios2/pkg-install
new file mode 100644
index 0000000..52af9cc
--- /dev/null
+++ b/net-mgmt/nagios2/pkg-install
@@ -0,0 +1,68 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+PKG_PREFIX=${PKG_PREFIX:=/usr/local}
+
+user=netsaint
+group=netsaint
+
+ask() {
+ local question default answer
+
+ question=$1
+ default=$2
+ if [ -z "${PACKAGE_BUILDING}" ]; then
+ read -p "${question} [${default}]? " answer
+ fi
+ if [ x${answer} = x ]; then
+ answer=${default}
+ fi
+ echo ${answer}
+}
+
+yesno() {
+ local dflt question answer
+
+ question=$1
+ dflt=$2
+ while :; do
+ answer=$(ask "${question}" "${dflt}")
+ case "${answer}" in
+ [Yy]*) return 0;;
+ [Nn]*) return 1;;
+ esac
+ echo "Please answer yes or no."
+ done
+}
+
+if [ x"$2" = xPRE-INSTALL ]; then
+ if /usr/sbin/pw groupshow "${group}" 2>/dev/null; then
+ echo "You already have a group \"${group}\", so I will use it."
+ else
+ echo "You need a group \"${group}\"."
+ if yesno "Would you like me to create it" y; then
+ /usr/sbin/pw groupadd ${group} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+ fi
+
+ if /usr/sbin/pw user show "${user}" 2>/dev/null; then
+ echo "You already have a user \"${user}\", so I will use it."
+ else
+ echo "You need a user \"${user}\"."
+ if yesno "Would you like me to create it" y; then
+ /usr/sbin/pw useradd ${user} -g ${group} -h - -d ${PKG_PREFIX}/var/netsaint \
+ -s /nonexistent -c "Netsaint pseudo-user" || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+ fi
+
+fi
diff --git a/net-mgmt/nagios2/pkg-plist b/net-mgmt/nagios2/pkg-plist
index d71e872..fd71eef 100644
--- a/net-mgmt/nagios2/pkg-plist
+++ b/net-mgmt/nagios2/pkg-plist
@@ -2,7 +2,7 @@
@exec mkdir -p %D/var/netsaint/rw
@exec chmod 775 %D/var/netsaint %D/var/netsaint/archives %D/var/netsaint/rw
@exec chown netsaint:netsaint %D/var/netsaint %D/var/netsaint/archives
-@exec chown nobody:nogroup %D/var/netsaint/rw
+@exec chown netsaint:nogroup %D/var/netsaint/rw
bin/netsaint
etc/netsaint/commands.cfg.dist
etc/netsaint/hosts.cfg.dist
@@ -291,3 +291,4 @@ share/netsaint/stylesheets/trends.css
@unexec rmdir %D/var/netsaint/archives 2>/dev/null || true
@unexec rmdir %D/var/netsaint/rw 2>/dev/null || true
@unexec rmdir %D/var/netsaint 2>/dev/null || true
+@unexec rmdir %D/var 2>/dev/null || true
diff --git a/net-mgmt/nagios2/scripts/createuser b/net-mgmt/nagios2/scripts/createuser
deleted file mode 100644
index 0ebde3c..0000000
--- a/net-mgmt/nagios2/scripts/createuser
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/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:/var/netsaint:/sbin/nologin\"" );
-
-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 );
-}
diff --git a/net-mgmt/netsaint-plugins/Makefile b/net-mgmt/netsaint-plugins/Makefile
index 6d84d42..e51dcaa 100644
--- a/net-mgmt/netsaint-plugins/Makefile
+++ b/net-mgmt/netsaint-plugins/Makefile
@@ -6,13 +6,12 @@
#
PORTNAME= netsaint-plugins
-PORTVERSION= 1.2.9.3
-PORTREVISION= 2
+PORTVERSION= 1.2.9.4
CATEGORIES= net
MASTER_SITES= http://download.sourceforge.net/netsaintplug/
-DISTNAME= ${PORTNAME}-1.2.9-3
+DISTNAME= ${PORTNAME}-1.2.9-4
-MAINTAINER= blaz@amis.net
+MAINTAINER= blaz@si.FreeBSD.org
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --sbindir=${PREFIX}/share/netsaint/sbin \
@@ -31,9 +30,6 @@ pre-fetch:
.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc"
.endif
-pre-install:
- ${PERL} ${SCRIPTDIR}/createuser
-
post-clean:
@${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc
diff --git a/net-mgmt/netsaint-plugins/distinfo b/net-mgmt/netsaint-plugins/distinfo
index 57e3a22..f83d420 100644
--- a/net-mgmt/netsaint-plugins/distinfo
+++ b/net-mgmt/netsaint-plugins/distinfo
@@ -1 +1 @@
-MD5 (netsaint-plugins-1.2.9-3.tar.gz) = 2e9928dcb1d522144ba0bb9a98619035
+MD5 (netsaint-plugins-1.2.9-4.tar.gz) = ef4adb2b9e77abebd3797e5ebe093014
diff --git a/net-mgmt/netsaint-plugins/files/patch-ab b/net-mgmt/netsaint-plugins/files/patch-ab
index 4d27df5..126c8b0 100644
--- a/net-mgmt/netsaint-plugins/files/patch-ab
+++ b/net-mgmt/netsaint-plugins/files/patch-ab
@@ -1,5 +1,5 @@
---- configure.in.orig Tue Mar 6 06:40:44 2001
-+++ configure.in Mon Apr 16 12:24:22 2001
+--- configure.in.orig Thu Apr 26 16:00:26 2001
++++ configure.in Tue May 1 18:28:01 2001
@@ -7,7 +7,7 @@
dnl AM_INIT_AUTOMAKE(netsaint-plugins,$VERSION)
AM_CONFIG_HEADER(plugins/config.h plugins/common.h plugins/version.h plugins/netutils.h plugins/utils.h plugins/popen.h)
@@ -9,7 +9,18 @@
dnl Figure out how to invoke "install" and what install options to use.
-@@ -126,25 +126,37 @@
+@@ -99,8 +99,8 @@
+ AC_CHECK_HEADERS(postgresql/libpq-fe.h)
+ AC_CHECK_HEADERS(libpq-fe.h)
+ if test "$ac_cv_header_pgsql_libpq_fe_h" = "yes"; then
+- PGLIBS="-lpq -lcrypt"
+- PGINCLUDE="-I/usr/include/pgsql"
++ PGLIBS="-L$PGSQL/lib -lpq -lcrypt"
++ PGINCLUDE="-I$PGSQL/include/pgsql"
+ elif test "$ac_cv_header_postgresql_libpq_fe_h" = "yes"; then
+ PGLIBS="-L$PGSQL/lib -lpq -lcrypt"
+ PGINCLUDE="-I/usr/include/postgresql"
+@@ -128,25 +128,37 @@
LIBS="$_SAVEDLIBS"
CPPFLAGS="$_SAVEDCPPFLAGS"
@@ -53,7 +64,7 @@
AC_SUBST(LDAPLIBS)
AC_SUBST(LDAPINCLUDE)
EXTRAS="$EXTRAS check_ldap"
-@@ -153,13 +165,14 @@
+@@ -155,13 +167,14 @@
AC_MSG_WARN([install LDAP libs to compile this plugin (see Requirements).])
fi
LIBS="$_SAVEDLIBS"
@@ -70,7 +81,7 @@
AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz" check_mysql_LDFLAGS="-L$MYSQLLIBDIR",,-L$MYSQLLIBDIR -lz)
elif test -f /usr/lib/libmysqlclient.so; then
AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz",,-lz)
-@@ -175,7 +188,8 @@
+@@ -177,7 +190,8 @@
AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient" check_mysql_LDFLAGS="-L/usr/lib/mysql",,-L/usr/lib/mysql)
fi
if test "$ac_cv_lib_mysqlclient_mysql_init" = "yes" -o "$ac_cv_lib_mysqlclient_mysql_close" = "yes"; then
@@ -80,7 +91,7 @@
if test "$ac_cv_header_mysql_mysql_h" = "yes" -a "$ac_cv_header_mysql_errmsg_h" = "yes"; then
EXTRAS="$EXTRAS check_mysql"
AC_SUBST(MYSQLLIBS)
-@@ -189,7 +203,7 @@
+@@ -191,7 +205,7 @@
AC_MSG_WARN([install mysql client libs to compile this plugin (see Requirements).])
fi
LIBS="$_SAVEDLIBS"
@@ -89,7 +100,7 @@
dnl Check for OpenSSL location
AC_PATH_PROG(OPENSSL,openssl)
-@@ -268,16 +282,16 @@
+@@ -270,16 +284,16 @@
dnl AC_SUBST(libgetopt_a_DEPENDENCIES)
dnl AC_SUBST(libsnprintf_a_SOURCES)
@@ -115,7 +126,7 @@
AC_CHECK_FUNC(vsnprintf,,LIBS="$LIBS -lsnprintf" DEPLIBS="$DEPLIBS libsnprintf.a")
-@@ -328,72 +342,72 @@
+@@ -330,72 +344,72 @@
AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -eo 'rss comm'")
AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s")
echo " ps syntax... $PATH_TO_PS -eo 's comm vsz rss user ppid args'"
@@ -204,7 +215,7 @@
AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS waxo 'state uid ppid command'")
EXTRAS="$EXTRAS check_netsaint"
- AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS waxco 'state uid ppid command command'")
-+ AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS waxo 'state uid ppid command command'")
++ AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS waxo 'state uid ppid command'")
AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n")
- AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS waxco 'vsz command'")
+ AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS waxo 'vsz command'")
@@ -217,7 +228,7 @@
dnl BSD-like mode in RH 6.1
elif [ps waxno 'state comm vsz rss uid user ppid args' 2>/dev/null | egrep -i "^S +COMMAND +VSZ +RSS +UID +USER +PPID +[RGSCOMDNA]+" >/dev/null]
then
-@@ -407,7 +421,7 @@
+@@ -409,7 +423,7 @@
AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s")
AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS waxno 'rss comm'")
AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s")
@@ -226,7 +237,7 @@
dnl IRIX 53
elif [ps -el 2>/dev/null | egrep -i "^ *F +S +UID +PID +PPID +C +PRI +NI +P +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+" >/dev/null]
then
-@@ -618,6 +632,8 @@
+@@ -620,6 +634,8 @@
AC_DEFINE_UNQUOTED(WHO_COMMAND,"$PATH_TO_WHO")
fi
@@ -235,7 +246,7 @@
AC_PATH_PROG(PATH_TO_SNMPGET,snmpget)
if test -f "$PATH_TO_SNMPGET"
then
-@@ -626,6 +642,7 @@
+@@ -628,6 +644,7 @@
else
echo "** Get snmpget from http://ucd-snmp.ucdavis.edu to make check_hpjd and check_snmp plugins"
fi
@@ -243,7 +254,7 @@
AC_PATH_PROG(PATH_TO_SNMPGETNEXT,snmpgetnext)
if test -f "$PATH_TO_SNMPGETNEXT"
-@@ -633,6 +650,8 @@
+@@ -635,6 +652,8 @@
AC_DEFINE_UNQUOTED(PATH_TO_SNMPGETNEXT,"$PATH_TO_SNMPGETNEXT")
fi
@@ -252,7 +263,7 @@
AC_PATH_PROG(PATH_TO_QUAKESTAT,quakestat)
AC_PATH_PROG(PATH_TO_QSTAT,qstat)
if test -n "$PATH_TO_QUAKESTAT"
-@@ -646,7 +665,10 @@
+@@ -648,7 +667,10 @@
else
echo "** Get qstat from http://www.activesw.com/people/steve/qstat.html in order to make check_game plugin"
fi
@@ -263,7 +274,7 @@
AC_PATH_PROG(PATH_TO_FPING,fping)
if test -n "$PATH_TO_FPING"
then
-@@ -654,6 +676,7 @@
+@@ -656,6 +678,7 @@
EXTRAS="$EXTRAS check_fping"
else
echo "** Get fping from http://www.stanford.edu/~schemers/docs/fping/fping.html in order to make check_fping plugin"
diff --git a/net-mgmt/netsaint-plugins/files/patch-ac b/net-mgmt/netsaint-plugins/files/patch-ac
index 994cda9..796ee76 100644
--- a/net-mgmt/netsaint-plugins/files/patch-ac
+++ b/net-mgmt/netsaint-plugins/files/patch-ac
@@ -1,11 +1,12 @@
---- plugins-scripts/check_ntp.pl.orig Mon Aug 28 17:00:59 2000
-+++ plugins-scripts/check_ntp.pl Mon Apr 9 19:37:32 2001
-@@ -153,7 +153,7 @@
+--- plugins-scripts/check_ntp.pl.orig Mon Apr 23 19:43:00 2001
++++ plugins-scripts/check_ntp.pl Sun Apr 29 18:38:26 2001
+@@ -154,7 +154,8 @@
###
###
--if (#open(NTPDC,"/usr/sbin/ntpdc -c $host 2>&1 |") ||
-+if (open(NTPDC,"/usr/sbin/ntpdc -c $host 2>&1 |") ||
- open(NTPDC,"/usr/sbin/xntpdc -c $host 2>&1 |") ) {
+-if (open(NTPDC,"/usr/sbin/xntpdc -c peers $host 2>&1 |") ) {
++if (open(NTPDC,"/usr/sbin/xntpdc -c peers $host 2>&1 |") ||
++ open(NTPDC,"/usr/sbin/ntpdc -c peers $host 2>&1 |")) {
while (<NTPDC>) {
print if ($verbose);
+ if (/([^\s]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)/) {
diff --git a/net-mgmt/netsaint-plugins/pkg-plist b/net-mgmt/netsaint-plugins/pkg-plist
index dad66c5..2fc8569 100644
--- a/net-mgmt/netsaint-plugins/pkg-plist
+++ b/net-mgmt/netsaint-plugins/pkg-plist
@@ -19,8 +19,10 @@ libexec/netsaint/check_log
libexec/netsaint/check_mrtg
libexec/netsaint/check_mrtgtraf
%%SUB_MYSQL%%libexec/netsaint/check_mysql
+libexec/netsaint/check_netdns
libexec/netsaint/check_netsaint
libexec/netsaint/check_nntp
+libexec/netsaint/check_nt
libexec/netsaint/check_ntp
libexec/netsaint/check_nwstat
libexec/netsaint/check_oracle
diff --git a/net-mgmt/netsaint-plugins/scripts/configure b/net-mgmt/netsaint-plugins/scripts/configure
index efb8303..1a17d8f 100644
--- a/net-mgmt/netsaint-plugins/scripts/configure
+++ b/net-mgmt/netsaint-plugins/scripts/configure
@@ -81,7 +81,7 @@ while [ "$1" ]; do
;;
\"PostgreSQL\")
echo "LIB_DEPENDS+= pq.2:\${PORTSDIR}/databases/postgresql7"
- echo "CONFIGURE_ARGS+= --with-pgsql=\${LOCALBASE}/pgsql"
+ echo "CONFIGURE_ARGS+= --with-pgsql=\${LOCALBASE}"
SUB_PGSQL=""
;;
\"OpenLDAP\")
diff --git a/net-mgmt/netsaint-plugins/scripts/createuser b/net-mgmt/netsaint-plugins/scripts/createuser
deleted file mode 100644
index 0ebde3c..0000000
--- a/net-mgmt/netsaint-plugins/scripts/createuser
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/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:/var/netsaint:/sbin/nologin\"" );
-
-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 );
-}
diff --git a/net-mgmt/netsaint/Makefile b/net-mgmt/netsaint/Makefile
index dc57265..05a8c85 100644
--- a/net-mgmt/netsaint/Makefile
+++ b/net-mgmt/netsaint/Makefile
@@ -6,11 +6,11 @@
#
PORTNAME= netsaint
-PORTVERSION= 0.0.7b3
+PORTVERSION= 0.0.7b4
CATEGORIES= net
MASTER_SITES= http://netsaint.sourceforge.net/download/
-MAINTAINER= blaz@amis.net
+MAINTAINER= blaz@si.FreeBSD.org
LIB_DEPENDS= gd.2:${PORTSDIR}/graphics/gd \
gnugetopt.1:${PORTSDIR}/devel/libgnugetopt
@@ -20,7 +20,7 @@ GNU_CONFIGURE= yes
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
LIBS="-L${LOCALBASE}/lib -lgd -lgnugetopt"
-CONFIGURE_ARGS= --with-command-user=nobody \
+CONFIGURE_ARGS= --with-command-user=netsaint \
--with-command-grp=nogroup \
--with-netsaint-user=netsaint \
--with-netsaint-grp=netsaint \
@@ -36,6 +36,6 @@ pre-fetch:
@${SH} ${SCRIPTDIR}/checkps
pre-install:
- ${PERL} ${SCRIPTDIR}/createuser
+ @PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
.include <bsd.port.mk>
diff --git a/net-mgmt/netsaint/distinfo b/net-mgmt/netsaint/distinfo
index ebfae03..0fc5dd9 100644
--- a/net-mgmt/netsaint/distinfo
+++ b/net-mgmt/netsaint/distinfo
@@ -1 +1 @@
-MD5 (netsaint-0.0.7b3.tar.gz) = b21ed67a86266b021037f46c78c5900f
+MD5 (netsaint-0.0.7b4.tar.gz) = d718507bb3a9cb24e6754440acc76b24
diff --git a/net-mgmt/netsaint/files/patch-aa b/net-mgmt/netsaint/files/patch-aa
index e106d0e..52e4d17 100644
--- a/net-mgmt/netsaint/files/patch-aa
+++ b/net-mgmt/netsaint/files/patch-aa
@@ -1,5 +1,5 @@
---- Makefile.in.orig Thu Mar 1 05:49:19 2001
-+++ Makefile.in Tue Apr 3 10:02:31 2001
+--- Makefile.in.orig Mon Apr 30 17:22:35 2001
++++ Makefile.in Tue May 1 19:58:50 2001
@@ -27,7 +27,7 @@
INSTALL_OPTS=@INSTALL_OPTS@
COMMAND_OPTS=@COMMAND_OPTS@
@@ -9,7 +9,7 @@
CGICFGDIR=$(CGIDIR)
PERLDIR=@PERLDIR@
-@@ -99,16 +99,16 @@
+@@ -99,20 +99,20 @@
install-config:
$(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)
@@ -32,3 +32,8 @@
install-commandmode:
$(INSTALL) -m 775 $(COMMAND_OPTS) -d $(DESTDIR)$(LOGDIR)/rw
+- chmod g+s $(DESTDIR)$(LOGDIR)/rw
++# chmod g+s $(DESTDIR)$(LOGDIR)/rw
+
+ fullinstall: install install-init install-commandmode
+
diff --git a/net-mgmt/netsaint/files/patch-ae b/net-mgmt/netsaint/files/patch-ae
index 6cbf9e2..37f2c6d 100644
--- a/net-mgmt/netsaint/files/patch-ae
+++ b/net-mgmt/netsaint/files/patch-ae
@@ -1,11 +1,11 @@
---- configure.in Fri Apr 7 11:11:34 2000
-+++ configure.in.new Mon Jun 5 16:09:21 2000
+--- configure.in.orig Mon Apr 30 17:22:35 2001
++++ configure.in Tue May 1 19:36:54 2001
@@ -1,7 +1,7 @@
- dnl Process this file with autoconf to produce a configure script.
+ dnl Process this -*-m4-*- 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_CONFIG_HEADER(common/config.h common/snprintf.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.
-
+ AC_PROG_INSTALL
diff --git a/net-mgmt/netsaint/files/patch-ai b/net-mgmt/netsaint/files/patch-ai
index ef3b63b..1820da9 100644
--- a/net-mgmt/netsaint/files/patch-ai
+++ b/net-mgmt/netsaint/files/patch-ai
@@ -1,5 +1,5 @@
---- daemon-init.in.orig Sun Feb 18 23:33:21 2001
-+++ daemon-init.in Tue Apr 3 20:58:18 2001
+--- daemon-init.in.orig Sat Mar 24 19:58:26 2001
++++ daemon-init.in Tue May 1 19:38:52 2001
@@ -68,12 +68,9 @@
@@ -16,12 +16,12 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
-@@ -101,7 +98,7 @@
+@@ -102,7 +99,7 @@
start)
echo "Starting network monitor: netsaint"
- su $Netsaint -c "touch $NetsaintVar/netsaint.log $NetsaintSav"
+ su -m $Netsaint -c "touch $NetsaintVar/netsaint.log $NetsaintSav"
+ rm -f $NetsaintCmd
$NetsaintBin -d $NetsaintCfg
if [ -d $NetsaintLckDir ]; then touch $NetsaintLckDir/$NetsaintLckFile; fi
- sleep 1
diff --git a/net-mgmt/netsaint/pkg-install b/net-mgmt/netsaint/pkg-install
new file mode 100644
index 0000000..52af9cc
--- /dev/null
+++ b/net-mgmt/netsaint/pkg-install
@@ -0,0 +1,68 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+PKG_PREFIX=${PKG_PREFIX:=/usr/local}
+
+user=netsaint
+group=netsaint
+
+ask() {
+ local question default answer
+
+ question=$1
+ default=$2
+ if [ -z "${PACKAGE_BUILDING}" ]; then
+ read -p "${question} [${default}]? " answer
+ fi
+ if [ x${answer} = x ]; then
+ answer=${default}
+ fi
+ echo ${answer}
+}
+
+yesno() {
+ local dflt question answer
+
+ question=$1
+ dflt=$2
+ while :; do
+ answer=$(ask "${question}" "${dflt}")
+ case "${answer}" in
+ [Yy]*) return 0;;
+ [Nn]*) return 1;;
+ esac
+ echo "Please answer yes or no."
+ done
+}
+
+if [ x"$2" = xPRE-INSTALL ]; then
+ if /usr/sbin/pw groupshow "${group}" 2>/dev/null; then
+ echo "You already have a group \"${group}\", so I will use it."
+ else
+ echo "You need a group \"${group}\"."
+ if yesno "Would you like me to create it" y; then
+ /usr/sbin/pw groupadd ${group} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+ fi
+
+ if /usr/sbin/pw user show "${user}" 2>/dev/null; then
+ echo "You already have a user \"${user}\", so I will use it."
+ else
+ echo "You need a user \"${user}\"."
+ if yesno "Would you like me to create it" y; then
+ /usr/sbin/pw useradd ${user} -g ${group} -h - -d ${PKG_PREFIX}/var/netsaint \
+ -s /nonexistent -c "Netsaint pseudo-user" || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+ fi
+
+fi
diff --git a/net-mgmt/netsaint/pkg-plist b/net-mgmt/netsaint/pkg-plist
index d71e872..fd71eef 100644
--- a/net-mgmt/netsaint/pkg-plist
+++ b/net-mgmt/netsaint/pkg-plist
@@ -2,7 +2,7 @@
@exec mkdir -p %D/var/netsaint/rw
@exec chmod 775 %D/var/netsaint %D/var/netsaint/archives %D/var/netsaint/rw
@exec chown netsaint:netsaint %D/var/netsaint %D/var/netsaint/archives
-@exec chown nobody:nogroup %D/var/netsaint/rw
+@exec chown netsaint:nogroup %D/var/netsaint/rw
bin/netsaint
etc/netsaint/commands.cfg.dist
etc/netsaint/hosts.cfg.dist
@@ -291,3 +291,4 @@ share/netsaint/stylesheets/trends.css
@unexec rmdir %D/var/netsaint/archives 2>/dev/null || true
@unexec rmdir %D/var/netsaint/rw 2>/dev/null || true
@unexec rmdir %D/var/netsaint 2>/dev/null || true
+@unexec rmdir %D/var 2>/dev/null || true
diff --git a/net-mgmt/netsaint/scripts/createuser b/net-mgmt/netsaint/scripts/createuser
deleted file mode 100644
index 0ebde3c..0000000
--- a/net-mgmt/netsaint/scripts/createuser
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/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:/var/netsaint:/sbin/nologin\"" );
-
-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 );
-}
diff --git a/net/nagios-plugins/Makefile b/net/nagios-plugins/Makefile
index 6d84d42..e51dcaa 100644
--- a/net/nagios-plugins/Makefile
+++ b/net/nagios-plugins/Makefile
@@ -6,13 +6,12 @@
#
PORTNAME= netsaint-plugins
-PORTVERSION= 1.2.9.3
-PORTREVISION= 2
+PORTVERSION= 1.2.9.4
CATEGORIES= net
MASTER_SITES= http://download.sourceforge.net/netsaintplug/
-DISTNAME= ${PORTNAME}-1.2.9-3
+DISTNAME= ${PORTNAME}-1.2.9-4
-MAINTAINER= blaz@amis.net
+MAINTAINER= blaz@si.FreeBSD.org
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --sbindir=${PREFIX}/share/netsaint/sbin \
@@ -31,9 +30,6 @@ pre-fetch:
.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc"
.endif
-pre-install:
- ${PERL} ${SCRIPTDIR}/createuser
-
post-clean:
@${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc
diff --git a/net/nagios-plugins/distinfo b/net/nagios-plugins/distinfo
index 57e3a22..f83d420 100644
--- a/net/nagios-plugins/distinfo
+++ b/net/nagios-plugins/distinfo
@@ -1 +1 @@
-MD5 (netsaint-plugins-1.2.9-3.tar.gz) = 2e9928dcb1d522144ba0bb9a98619035
+MD5 (netsaint-plugins-1.2.9-4.tar.gz) = ef4adb2b9e77abebd3797e5ebe093014
diff --git a/net/nagios-plugins/files/patch-ab b/net/nagios-plugins/files/patch-ab
index 4d27df5..126c8b0 100644
--- a/net/nagios-plugins/files/patch-ab
+++ b/net/nagios-plugins/files/patch-ab
@@ -1,5 +1,5 @@
---- configure.in.orig Tue Mar 6 06:40:44 2001
-+++ configure.in Mon Apr 16 12:24:22 2001
+--- configure.in.orig Thu Apr 26 16:00:26 2001
++++ configure.in Tue May 1 18:28:01 2001
@@ -7,7 +7,7 @@
dnl AM_INIT_AUTOMAKE(netsaint-plugins,$VERSION)
AM_CONFIG_HEADER(plugins/config.h plugins/common.h plugins/version.h plugins/netutils.h plugins/utils.h plugins/popen.h)
@@ -9,7 +9,18 @@
dnl Figure out how to invoke "install" and what install options to use.
-@@ -126,25 +126,37 @@
+@@ -99,8 +99,8 @@
+ AC_CHECK_HEADERS(postgresql/libpq-fe.h)
+ AC_CHECK_HEADERS(libpq-fe.h)
+ if test "$ac_cv_header_pgsql_libpq_fe_h" = "yes"; then
+- PGLIBS="-lpq -lcrypt"
+- PGINCLUDE="-I/usr/include/pgsql"
++ PGLIBS="-L$PGSQL/lib -lpq -lcrypt"
++ PGINCLUDE="-I$PGSQL/include/pgsql"
+ elif test "$ac_cv_header_postgresql_libpq_fe_h" = "yes"; then
+ PGLIBS="-L$PGSQL/lib -lpq -lcrypt"
+ PGINCLUDE="-I/usr/include/postgresql"
+@@ -128,25 +128,37 @@
LIBS="$_SAVEDLIBS"
CPPFLAGS="$_SAVEDCPPFLAGS"
@@ -53,7 +64,7 @@
AC_SUBST(LDAPLIBS)
AC_SUBST(LDAPINCLUDE)
EXTRAS="$EXTRAS check_ldap"
-@@ -153,13 +165,14 @@
+@@ -155,13 +167,14 @@
AC_MSG_WARN([install LDAP libs to compile this plugin (see Requirements).])
fi
LIBS="$_SAVEDLIBS"
@@ -70,7 +81,7 @@
AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz" check_mysql_LDFLAGS="-L$MYSQLLIBDIR",,-L$MYSQLLIBDIR -lz)
elif test -f /usr/lib/libmysqlclient.so; then
AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz",,-lz)
-@@ -175,7 +188,8 @@
+@@ -177,7 +190,8 @@
AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient" check_mysql_LDFLAGS="-L/usr/lib/mysql",,-L/usr/lib/mysql)
fi
if test "$ac_cv_lib_mysqlclient_mysql_init" = "yes" -o "$ac_cv_lib_mysqlclient_mysql_close" = "yes"; then
@@ -80,7 +91,7 @@
if test "$ac_cv_header_mysql_mysql_h" = "yes" -a "$ac_cv_header_mysql_errmsg_h" = "yes"; then
EXTRAS="$EXTRAS check_mysql"
AC_SUBST(MYSQLLIBS)
-@@ -189,7 +203,7 @@
+@@ -191,7 +205,7 @@
AC_MSG_WARN([install mysql client libs to compile this plugin (see Requirements).])
fi
LIBS="$_SAVEDLIBS"
@@ -89,7 +100,7 @@
dnl Check for OpenSSL location
AC_PATH_PROG(OPENSSL,openssl)
-@@ -268,16 +282,16 @@
+@@ -270,16 +284,16 @@
dnl AC_SUBST(libgetopt_a_DEPENDENCIES)
dnl AC_SUBST(libsnprintf_a_SOURCES)
@@ -115,7 +126,7 @@
AC_CHECK_FUNC(vsnprintf,,LIBS="$LIBS -lsnprintf" DEPLIBS="$DEPLIBS libsnprintf.a")
-@@ -328,72 +342,72 @@
+@@ -330,72 +344,72 @@
AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -eo 'rss comm'")
AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s")
echo " ps syntax... $PATH_TO_PS -eo 's comm vsz rss user ppid args'"
@@ -204,7 +215,7 @@
AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS waxo 'state uid ppid command'")
EXTRAS="$EXTRAS check_netsaint"
- AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS waxco 'state uid ppid command command'")
-+ AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS waxo 'state uid ppid command command'")
++ AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS waxo 'state uid ppid command'")
AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n")
- AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS waxco 'vsz command'")
+ AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS waxo 'vsz command'")
@@ -217,7 +228,7 @@
dnl BSD-like mode in RH 6.1
elif [ps waxno 'state comm vsz rss uid user ppid args' 2>/dev/null | egrep -i "^S +COMMAND +VSZ +RSS +UID +USER +PPID +[RGSCOMDNA]+" >/dev/null]
then
-@@ -407,7 +421,7 @@
+@@ -409,7 +423,7 @@
AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s")
AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS waxno 'rss comm'")
AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s")
@@ -226,7 +237,7 @@
dnl IRIX 53
elif [ps -el 2>/dev/null | egrep -i "^ *F +S +UID +PID +PPID +C +PRI +NI +P +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+" >/dev/null]
then
-@@ -618,6 +632,8 @@
+@@ -620,6 +634,8 @@
AC_DEFINE_UNQUOTED(WHO_COMMAND,"$PATH_TO_WHO")
fi
@@ -235,7 +246,7 @@
AC_PATH_PROG(PATH_TO_SNMPGET,snmpget)
if test -f "$PATH_TO_SNMPGET"
then
-@@ -626,6 +642,7 @@
+@@ -628,6 +644,7 @@
else
echo "** Get snmpget from http://ucd-snmp.ucdavis.edu to make check_hpjd and check_snmp plugins"
fi
@@ -243,7 +254,7 @@
AC_PATH_PROG(PATH_TO_SNMPGETNEXT,snmpgetnext)
if test -f "$PATH_TO_SNMPGETNEXT"
-@@ -633,6 +650,8 @@
+@@ -635,6 +652,8 @@
AC_DEFINE_UNQUOTED(PATH_TO_SNMPGETNEXT,"$PATH_TO_SNMPGETNEXT")
fi
@@ -252,7 +263,7 @@
AC_PATH_PROG(PATH_TO_QUAKESTAT,quakestat)
AC_PATH_PROG(PATH_TO_QSTAT,qstat)
if test -n "$PATH_TO_QUAKESTAT"
-@@ -646,7 +665,10 @@
+@@ -648,7 +667,10 @@
else
echo "** Get qstat from http://www.activesw.com/people/steve/qstat.html in order to make check_game plugin"
fi
@@ -263,7 +274,7 @@
AC_PATH_PROG(PATH_TO_FPING,fping)
if test -n "$PATH_TO_FPING"
then
-@@ -654,6 +676,7 @@
+@@ -656,6 +678,7 @@
EXTRAS="$EXTRAS check_fping"
else
echo "** Get fping from http://www.stanford.edu/~schemers/docs/fping/fping.html in order to make check_fping plugin"
diff --git a/net/nagios-plugins/files/patch-ac b/net/nagios-plugins/files/patch-ac
index 994cda9..796ee76 100644
--- a/net/nagios-plugins/files/patch-ac
+++ b/net/nagios-plugins/files/patch-ac
@@ -1,11 +1,12 @@
---- plugins-scripts/check_ntp.pl.orig Mon Aug 28 17:00:59 2000
-+++ plugins-scripts/check_ntp.pl Mon Apr 9 19:37:32 2001
-@@ -153,7 +153,7 @@
+--- plugins-scripts/check_ntp.pl.orig Mon Apr 23 19:43:00 2001
++++ plugins-scripts/check_ntp.pl Sun Apr 29 18:38:26 2001
+@@ -154,7 +154,8 @@
###
###
--if (#open(NTPDC,"/usr/sbin/ntpdc -c $host 2>&1 |") ||
-+if (open(NTPDC,"/usr/sbin/ntpdc -c $host 2>&1 |") ||
- open(NTPDC,"/usr/sbin/xntpdc -c $host 2>&1 |") ) {
+-if (open(NTPDC,"/usr/sbin/xntpdc -c peers $host 2>&1 |") ) {
++if (open(NTPDC,"/usr/sbin/xntpdc -c peers $host 2>&1 |") ||
++ open(NTPDC,"/usr/sbin/ntpdc -c peers $host 2>&1 |")) {
while (<NTPDC>) {
print if ($verbose);
+ if (/([^\s]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)/) {
diff --git a/net/nagios-plugins/pkg-plist b/net/nagios-plugins/pkg-plist
index dad66c5..2fc8569 100644
--- a/net/nagios-plugins/pkg-plist
+++ b/net/nagios-plugins/pkg-plist
@@ -19,8 +19,10 @@ libexec/netsaint/check_log
libexec/netsaint/check_mrtg
libexec/netsaint/check_mrtgtraf
%%SUB_MYSQL%%libexec/netsaint/check_mysql
+libexec/netsaint/check_netdns
libexec/netsaint/check_netsaint
libexec/netsaint/check_nntp
+libexec/netsaint/check_nt
libexec/netsaint/check_ntp
libexec/netsaint/check_nwstat
libexec/netsaint/check_oracle
diff --git a/net/nagios-plugins/scripts/configure b/net/nagios-plugins/scripts/configure
index efb8303..1a17d8f 100644
--- a/net/nagios-plugins/scripts/configure
+++ b/net/nagios-plugins/scripts/configure
@@ -81,7 +81,7 @@ while [ "$1" ]; do
;;
\"PostgreSQL\")
echo "LIB_DEPENDS+= pq.2:\${PORTSDIR}/databases/postgresql7"
- echo "CONFIGURE_ARGS+= --with-pgsql=\${LOCALBASE}/pgsql"
+ echo "CONFIGURE_ARGS+= --with-pgsql=\${LOCALBASE}"
SUB_PGSQL=""
;;
\"OpenLDAP\")
diff --git a/net/nagios-plugins/scripts/createuser b/net/nagios-plugins/scripts/createuser
deleted file mode 100644
index 0ebde3c..0000000
--- a/net/nagios-plugins/scripts/createuser
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/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:/var/netsaint:/sbin/nologin\"" );
-
-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 );
-}
diff --git a/net/nagios/Makefile b/net/nagios/Makefile
index dc57265..05a8c85 100644
--- a/net/nagios/Makefile
+++ b/net/nagios/Makefile
@@ -6,11 +6,11 @@
#
PORTNAME= netsaint
-PORTVERSION= 0.0.7b3
+PORTVERSION= 0.0.7b4
CATEGORIES= net
MASTER_SITES= http://netsaint.sourceforge.net/download/
-MAINTAINER= blaz@amis.net
+MAINTAINER= blaz@si.FreeBSD.org
LIB_DEPENDS= gd.2:${PORTSDIR}/graphics/gd \
gnugetopt.1:${PORTSDIR}/devel/libgnugetopt
@@ -20,7 +20,7 @@ GNU_CONFIGURE= yes
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
LIBS="-L${LOCALBASE}/lib -lgd -lgnugetopt"
-CONFIGURE_ARGS= --with-command-user=nobody \
+CONFIGURE_ARGS= --with-command-user=netsaint \
--with-command-grp=nogroup \
--with-netsaint-user=netsaint \
--with-netsaint-grp=netsaint \
@@ -36,6 +36,6 @@ pre-fetch:
@${SH} ${SCRIPTDIR}/checkps
pre-install:
- ${PERL} ${SCRIPTDIR}/createuser
+ @PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
.include <bsd.port.mk>
diff --git a/net/nagios/distinfo b/net/nagios/distinfo
index ebfae03..0fc5dd9 100644
--- a/net/nagios/distinfo
+++ b/net/nagios/distinfo
@@ -1 +1 @@
-MD5 (netsaint-0.0.7b3.tar.gz) = b21ed67a86266b021037f46c78c5900f
+MD5 (netsaint-0.0.7b4.tar.gz) = d718507bb3a9cb24e6754440acc76b24
diff --git a/net/nagios/files/patch-aa b/net/nagios/files/patch-aa
index e106d0e..52e4d17 100644
--- a/net/nagios/files/patch-aa
+++ b/net/nagios/files/patch-aa
@@ -1,5 +1,5 @@
---- Makefile.in.orig Thu Mar 1 05:49:19 2001
-+++ Makefile.in Tue Apr 3 10:02:31 2001
+--- Makefile.in.orig Mon Apr 30 17:22:35 2001
++++ Makefile.in Tue May 1 19:58:50 2001
@@ -27,7 +27,7 @@
INSTALL_OPTS=@INSTALL_OPTS@
COMMAND_OPTS=@COMMAND_OPTS@
@@ -9,7 +9,7 @@
CGICFGDIR=$(CGIDIR)
PERLDIR=@PERLDIR@
-@@ -99,16 +99,16 @@
+@@ -99,20 +99,20 @@
install-config:
$(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)
@@ -32,3 +32,8 @@
install-commandmode:
$(INSTALL) -m 775 $(COMMAND_OPTS) -d $(DESTDIR)$(LOGDIR)/rw
+- chmod g+s $(DESTDIR)$(LOGDIR)/rw
++# chmod g+s $(DESTDIR)$(LOGDIR)/rw
+
+ fullinstall: install install-init install-commandmode
+
diff --git a/net/nagios/files/patch-ae b/net/nagios/files/patch-ae
index 6cbf9e2..37f2c6d 100644
--- a/net/nagios/files/patch-ae
+++ b/net/nagios/files/patch-ae
@@ -1,11 +1,11 @@
---- configure.in Fri Apr 7 11:11:34 2000
-+++ configure.in.new Mon Jun 5 16:09:21 2000
+--- configure.in.orig Mon Apr 30 17:22:35 2001
++++ configure.in Tue May 1 19:36:54 2001
@@ -1,7 +1,7 @@
- dnl Process this file with autoconf to produce a configure script.
+ dnl Process this -*-m4-*- 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_CONFIG_HEADER(common/config.h common/snprintf.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.
-
+ AC_PROG_INSTALL
diff --git a/net/nagios/files/patch-ai b/net/nagios/files/patch-ai
index ef3b63b..1820da9 100644
--- a/net/nagios/files/patch-ai
+++ b/net/nagios/files/patch-ai
@@ -1,5 +1,5 @@
---- daemon-init.in.orig Sun Feb 18 23:33:21 2001
-+++ daemon-init.in Tue Apr 3 20:58:18 2001
+--- daemon-init.in.orig Sat Mar 24 19:58:26 2001
++++ daemon-init.in Tue May 1 19:38:52 2001
@@ -68,12 +68,9 @@
@@ -16,12 +16,12 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
-@@ -101,7 +98,7 @@
+@@ -102,7 +99,7 @@
start)
echo "Starting network monitor: netsaint"
- su $Netsaint -c "touch $NetsaintVar/netsaint.log $NetsaintSav"
+ su -m $Netsaint -c "touch $NetsaintVar/netsaint.log $NetsaintSav"
+ rm -f $NetsaintCmd
$NetsaintBin -d $NetsaintCfg
if [ -d $NetsaintLckDir ]; then touch $NetsaintLckDir/$NetsaintLckFile; fi
- sleep 1
diff --git a/net/nagios/pkg-install b/net/nagios/pkg-install
new file mode 100644
index 0000000..52af9cc
--- /dev/null
+++ b/net/nagios/pkg-install
@@ -0,0 +1,68 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+PKG_PREFIX=${PKG_PREFIX:=/usr/local}
+
+user=netsaint
+group=netsaint
+
+ask() {
+ local question default answer
+
+ question=$1
+ default=$2
+ if [ -z "${PACKAGE_BUILDING}" ]; then
+ read -p "${question} [${default}]? " answer
+ fi
+ if [ x${answer} = x ]; then
+ answer=${default}
+ fi
+ echo ${answer}
+}
+
+yesno() {
+ local dflt question answer
+
+ question=$1
+ dflt=$2
+ while :; do
+ answer=$(ask "${question}" "${dflt}")
+ case "${answer}" in
+ [Yy]*) return 0;;
+ [Nn]*) return 1;;
+ esac
+ echo "Please answer yes or no."
+ done
+}
+
+if [ x"$2" = xPRE-INSTALL ]; then
+ if /usr/sbin/pw groupshow "${group}" 2>/dev/null; then
+ echo "You already have a group \"${group}\", so I will use it."
+ else
+ echo "You need a group \"${group}\"."
+ if yesno "Would you like me to create it" y; then
+ /usr/sbin/pw groupadd ${group} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+ fi
+
+ if /usr/sbin/pw user show "${user}" 2>/dev/null; then
+ echo "You already have a user \"${user}\", so I will use it."
+ else
+ echo "You need a user \"${user}\"."
+ if yesno "Would you like me to create it" y; then
+ /usr/sbin/pw useradd ${user} -g ${group} -h - -d ${PKG_PREFIX}/var/netsaint \
+ -s /nonexistent -c "Netsaint pseudo-user" || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+ fi
+
+fi
diff --git a/net/nagios/pkg-plist b/net/nagios/pkg-plist
index d71e872..fd71eef 100644
--- a/net/nagios/pkg-plist
+++ b/net/nagios/pkg-plist
@@ -2,7 +2,7 @@
@exec mkdir -p %D/var/netsaint/rw
@exec chmod 775 %D/var/netsaint %D/var/netsaint/archives %D/var/netsaint/rw
@exec chown netsaint:netsaint %D/var/netsaint %D/var/netsaint/archives
-@exec chown nobody:nogroup %D/var/netsaint/rw
+@exec chown netsaint:nogroup %D/var/netsaint/rw
bin/netsaint
etc/netsaint/commands.cfg.dist
etc/netsaint/hosts.cfg.dist
@@ -291,3 +291,4 @@ share/netsaint/stylesheets/trends.css
@unexec rmdir %D/var/netsaint/archives 2>/dev/null || true
@unexec rmdir %D/var/netsaint/rw 2>/dev/null || true
@unexec rmdir %D/var/netsaint 2>/dev/null || true
+@unexec rmdir %D/var 2>/dev/null || true
diff --git a/net/nagios/scripts/createuser b/net/nagios/scripts/createuser
deleted file mode 100644
index 0ebde3c..0000000
--- a/net/nagios/scripts/createuser
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/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:/var/netsaint:/sbin/nologin\"" );
-
-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 );
-}
diff --git a/net/netsaint-plugins/Makefile b/net/netsaint-plugins/Makefile
index 6d84d42..e51dcaa 100644
--- a/net/netsaint-plugins/Makefile
+++ b/net/netsaint-plugins/Makefile
@@ -6,13 +6,12 @@
#
PORTNAME= netsaint-plugins
-PORTVERSION= 1.2.9.3
-PORTREVISION= 2
+PORTVERSION= 1.2.9.4
CATEGORIES= net
MASTER_SITES= http://download.sourceforge.net/netsaintplug/
-DISTNAME= ${PORTNAME}-1.2.9-3
+DISTNAME= ${PORTNAME}-1.2.9-4
-MAINTAINER= blaz@amis.net
+MAINTAINER= blaz@si.FreeBSD.org
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --sbindir=${PREFIX}/share/netsaint/sbin \
@@ -31,9 +30,6 @@ pre-fetch:
.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc"
.endif
-pre-install:
- ${PERL} ${SCRIPTDIR}/createuser
-
post-clean:
@${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc
diff --git a/net/netsaint-plugins/distinfo b/net/netsaint-plugins/distinfo
index 57e3a22..f83d420 100644
--- a/net/netsaint-plugins/distinfo
+++ b/net/netsaint-plugins/distinfo
@@ -1 +1 @@
-MD5 (netsaint-plugins-1.2.9-3.tar.gz) = 2e9928dcb1d522144ba0bb9a98619035
+MD5 (netsaint-plugins-1.2.9-4.tar.gz) = ef4adb2b9e77abebd3797e5ebe093014
diff --git a/net/netsaint-plugins/files/patch-ab b/net/netsaint-plugins/files/patch-ab
index 4d27df5..126c8b0 100644
--- a/net/netsaint-plugins/files/patch-ab
+++ b/net/netsaint-plugins/files/patch-ab
@@ -1,5 +1,5 @@
---- configure.in.orig Tue Mar 6 06:40:44 2001
-+++ configure.in Mon Apr 16 12:24:22 2001
+--- configure.in.orig Thu Apr 26 16:00:26 2001
++++ configure.in Tue May 1 18:28:01 2001
@@ -7,7 +7,7 @@
dnl AM_INIT_AUTOMAKE(netsaint-plugins,$VERSION)
AM_CONFIG_HEADER(plugins/config.h plugins/common.h plugins/version.h plugins/netutils.h plugins/utils.h plugins/popen.h)
@@ -9,7 +9,18 @@
dnl Figure out how to invoke "install" and what install options to use.
-@@ -126,25 +126,37 @@
+@@ -99,8 +99,8 @@
+ AC_CHECK_HEADERS(postgresql/libpq-fe.h)
+ AC_CHECK_HEADERS(libpq-fe.h)
+ if test "$ac_cv_header_pgsql_libpq_fe_h" = "yes"; then
+- PGLIBS="-lpq -lcrypt"
+- PGINCLUDE="-I/usr/include/pgsql"
++ PGLIBS="-L$PGSQL/lib -lpq -lcrypt"
++ PGINCLUDE="-I$PGSQL/include/pgsql"
+ elif test "$ac_cv_header_postgresql_libpq_fe_h" = "yes"; then
+ PGLIBS="-L$PGSQL/lib -lpq -lcrypt"
+ PGINCLUDE="-I/usr/include/postgresql"
+@@ -128,25 +128,37 @@
LIBS="$_SAVEDLIBS"
CPPFLAGS="$_SAVEDCPPFLAGS"
@@ -53,7 +64,7 @@
AC_SUBST(LDAPLIBS)
AC_SUBST(LDAPINCLUDE)
EXTRAS="$EXTRAS check_ldap"
-@@ -153,13 +165,14 @@
+@@ -155,13 +167,14 @@
AC_MSG_WARN([install LDAP libs to compile this plugin (see Requirements).])
fi
LIBS="$_SAVEDLIBS"
@@ -70,7 +81,7 @@
AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz" check_mysql_LDFLAGS="-L$MYSQLLIBDIR",,-L$MYSQLLIBDIR -lz)
elif test -f /usr/lib/libmysqlclient.so; then
AC_CHECK_LIB(mysqlclient,mysql_init,MYSQLLIBS="-lmysqlclient -lz",,-lz)
-@@ -175,7 +188,8 @@
+@@ -177,7 +190,8 @@
AC_CHECK_LIB(mysqlclient,mysql_close,MYSQLLIBS="-lmysqlclient" check_mysql_LDFLAGS="-L/usr/lib/mysql",,-L/usr/lib/mysql)
fi
if test "$ac_cv_lib_mysqlclient_mysql_init" = "yes" -o "$ac_cv_lib_mysqlclient_mysql_close" = "yes"; then
@@ -80,7 +91,7 @@
if test "$ac_cv_header_mysql_mysql_h" = "yes" -a "$ac_cv_header_mysql_errmsg_h" = "yes"; then
EXTRAS="$EXTRAS check_mysql"
AC_SUBST(MYSQLLIBS)
-@@ -189,7 +203,7 @@
+@@ -191,7 +205,7 @@
AC_MSG_WARN([install mysql client libs to compile this plugin (see Requirements).])
fi
LIBS="$_SAVEDLIBS"
@@ -89,7 +100,7 @@
dnl Check for OpenSSL location
AC_PATH_PROG(OPENSSL,openssl)
-@@ -268,16 +282,16 @@
+@@ -270,16 +284,16 @@
dnl AC_SUBST(libgetopt_a_DEPENDENCIES)
dnl AC_SUBST(libsnprintf_a_SOURCES)
@@ -115,7 +126,7 @@
AC_CHECK_FUNC(vsnprintf,,LIBS="$LIBS -lsnprintf" DEPLIBS="$DEPLIBS libsnprintf.a")
-@@ -328,72 +342,72 @@
+@@ -330,72 +344,72 @@
AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -eo 'rss comm'")
AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s")
echo " ps syntax... $PATH_TO_PS -eo 's comm vsz rss user ppid args'"
@@ -204,7 +215,7 @@
AC_DEFINE_UNQUOTED(PS_RAW_COMMAND,"$PATH_TO_PS waxo 'state uid ppid command'")
EXTRAS="$EXTRAS check_netsaint"
- AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS waxco 'state uid ppid command command'")
-+ AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS waxo 'state uid ppid command command'")
++ AC_DEFINE_UNQUOTED(PS_COMMAND,"$PATH_TO_PS waxo 'state uid ppid command'")
AC_DEFINE_UNQUOTED(PS_FORMAT,"%s %d %d %s %n")
- AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS waxco 'vsz command'")
+ AC_DEFINE_UNQUOTED(VSZ_COMMAND,"$PATH_TO_PS waxo 'vsz command'")
@@ -217,7 +228,7 @@
dnl BSD-like mode in RH 6.1
elif [ps waxno 'state comm vsz rss uid user ppid args' 2>/dev/null | egrep -i "^S +COMMAND +VSZ +RSS +UID +USER +PPID +[RGSCOMDNA]+" >/dev/null]
then
-@@ -407,7 +421,7 @@
+@@ -409,7 +423,7 @@
AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s")
AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS waxno 'rss comm'")
AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s")
@@ -226,7 +237,7 @@
dnl IRIX 53
elif [ps -el 2>/dev/null | egrep -i "^ *F +S +UID +PID +PPID +C +PRI +NI +P +SZ +RSS +WCHAN +TTY +TIME +[RGSCOMDNA]+" >/dev/null]
then
-@@ -618,6 +632,8 @@
+@@ -620,6 +634,8 @@
AC_DEFINE_UNQUOTED(WHO_COMMAND,"$PATH_TO_WHO")
fi
@@ -235,7 +246,7 @@
AC_PATH_PROG(PATH_TO_SNMPGET,snmpget)
if test -f "$PATH_TO_SNMPGET"
then
-@@ -626,6 +642,7 @@
+@@ -628,6 +644,7 @@
else
echo "** Get snmpget from http://ucd-snmp.ucdavis.edu to make check_hpjd and check_snmp plugins"
fi
@@ -243,7 +254,7 @@
AC_PATH_PROG(PATH_TO_SNMPGETNEXT,snmpgetnext)
if test -f "$PATH_TO_SNMPGETNEXT"
-@@ -633,6 +650,8 @@
+@@ -635,6 +652,8 @@
AC_DEFINE_UNQUOTED(PATH_TO_SNMPGETNEXT,"$PATH_TO_SNMPGETNEXT")
fi
@@ -252,7 +263,7 @@
AC_PATH_PROG(PATH_TO_QUAKESTAT,quakestat)
AC_PATH_PROG(PATH_TO_QSTAT,qstat)
if test -n "$PATH_TO_QUAKESTAT"
-@@ -646,7 +665,10 @@
+@@ -648,7 +667,10 @@
else
echo "** Get qstat from http://www.activesw.com/people/steve/qstat.html in order to make check_game plugin"
fi
@@ -263,7 +274,7 @@
AC_PATH_PROG(PATH_TO_FPING,fping)
if test -n "$PATH_TO_FPING"
then
-@@ -654,6 +676,7 @@
+@@ -656,6 +678,7 @@
EXTRAS="$EXTRAS check_fping"
else
echo "** Get fping from http://www.stanford.edu/~schemers/docs/fping/fping.html in order to make check_fping plugin"
diff --git a/net/netsaint-plugins/files/patch-ac b/net/netsaint-plugins/files/patch-ac
index 994cda9..796ee76 100644
--- a/net/netsaint-plugins/files/patch-ac
+++ b/net/netsaint-plugins/files/patch-ac
@@ -1,11 +1,12 @@
---- plugins-scripts/check_ntp.pl.orig Mon Aug 28 17:00:59 2000
-+++ plugins-scripts/check_ntp.pl Mon Apr 9 19:37:32 2001
-@@ -153,7 +153,7 @@
+--- plugins-scripts/check_ntp.pl.orig Mon Apr 23 19:43:00 2001
++++ plugins-scripts/check_ntp.pl Sun Apr 29 18:38:26 2001
+@@ -154,7 +154,8 @@
###
###
--if (#open(NTPDC,"/usr/sbin/ntpdc -c $host 2>&1 |") ||
-+if (open(NTPDC,"/usr/sbin/ntpdc -c $host 2>&1 |") ||
- open(NTPDC,"/usr/sbin/xntpdc -c $host 2>&1 |") ) {
+-if (open(NTPDC,"/usr/sbin/xntpdc -c peers $host 2>&1 |") ) {
++if (open(NTPDC,"/usr/sbin/xntpdc -c peers $host 2>&1 |") ||
++ open(NTPDC,"/usr/sbin/ntpdc -c peers $host 2>&1 |")) {
while (<NTPDC>) {
print if ($verbose);
+ if (/([^\s]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)/) {
diff --git a/net/netsaint-plugins/pkg-plist b/net/netsaint-plugins/pkg-plist
index dad66c5..2fc8569 100644
--- a/net/netsaint-plugins/pkg-plist
+++ b/net/netsaint-plugins/pkg-plist
@@ -19,8 +19,10 @@ libexec/netsaint/check_log
libexec/netsaint/check_mrtg
libexec/netsaint/check_mrtgtraf
%%SUB_MYSQL%%libexec/netsaint/check_mysql
+libexec/netsaint/check_netdns
libexec/netsaint/check_netsaint
libexec/netsaint/check_nntp
+libexec/netsaint/check_nt
libexec/netsaint/check_ntp
libexec/netsaint/check_nwstat
libexec/netsaint/check_oracle
diff --git a/net/netsaint-plugins/scripts/configure b/net/netsaint-plugins/scripts/configure
index efb8303..1a17d8f 100644
--- a/net/netsaint-plugins/scripts/configure
+++ b/net/netsaint-plugins/scripts/configure
@@ -81,7 +81,7 @@ while [ "$1" ]; do
;;
\"PostgreSQL\")
echo "LIB_DEPENDS+= pq.2:\${PORTSDIR}/databases/postgresql7"
- echo "CONFIGURE_ARGS+= --with-pgsql=\${LOCALBASE}/pgsql"
+ echo "CONFIGURE_ARGS+= --with-pgsql=\${LOCALBASE}"
SUB_PGSQL=""
;;
\"OpenLDAP\")
diff --git a/net/netsaint-plugins/scripts/createuser b/net/netsaint-plugins/scripts/createuser
deleted file mode 100644
index 0ebde3c..0000000
--- a/net/netsaint-plugins/scripts/createuser
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/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:/var/netsaint:/sbin/nologin\"" );
-
-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 );
-}
diff --git a/net/netsaint/Makefile b/net/netsaint/Makefile
index dc57265..05a8c85 100644
--- a/net/netsaint/Makefile
+++ b/net/netsaint/Makefile
@@ -6,11 +6,11 @@
#
PORTNAME= netsaint
-PORTVERSION= 0.0.7b3
+PORTVERSION= 0.0.7b4
CATEGORIES= net
MASTER_SITES= http://netsaint.sourceforge.net/download/
-MAINTAINER= blaz@amis.net
+MAINTAINER= blaz@si.FreeBSD.org
LIB_DEPENDS= gd.2:${PORTSDIR}/graphics/gd \
gnugetopt.1:${PORTSDIR}/devel/libgnugetopt
@@ -20,7 +20,7 @@ GNU_CONFIGURE= yes
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
LIBS="-L${LOCALBASE}/lib -lgd -lgnugetopt"
-CONFIGURE_ARGS= --with-command-user=nobody \
+CONFIGURE_ARGS= --with-command-user=netsaint \
--with-command-grp=nogroup \
--with-netsaint-user=netsaint \
--with-netsaint-grp=netsaint \
@@ -36,6 +36,6 @@ pre-fetch:
@${SH} ${SCRIPTDIR}/checkps
pre-install:
- ${PERL} ${SCRIPTDIR}/createuser
+ @PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
.include <bsd.port.mk>
diff --git a/net/netsaint/distinfo b/net/netsaint/distinfo
index ebfae03..0fc5dd9 100644
--- a/net/netsaint/distinfo
+++ b/net/netsaint/distinfo
@@ -1 +1 @@
-MD5 (netsaint-0.0.7b3.tar.gz) = b21ed67a86266b021037f46c78c5900f
+MD5 (netsaint-0.0.7b4.tar.gz) = d718507bb3a9cb24e6754440acc76b24
diff --git a/net/netsaint/files/patch-aa b/net/netsaint/files/patch-aa
index e106d0e..52e4d17 100644
--- a/net/netsaint/files/patch-aa
+++ b/net/netsaint/files/patch-aa
@@ -1,5 +1,5 @@
---- Makefile.in.orig Thu Mar 1 05:49:19 2001
-+++ Makefile.in Tue Apr 3 10:02:31 2001
+--- Makefile.in.orig Mon Apr 30 17:22:35 2001
++++ Makefile.in Tue May 1 19:58:50 2001
@@ -27,7 +27,7 @@
INSTALL_OPTS=@INSTALL_OPTS@
COMMAND_OPTS=@COMMAND_OPTS@
@@ -9,7 +9,7 @@
CGICFGDIR=$(CGIDIR)
PERLDIR=@PERLDIR@
-@@ -99,16 +99,16 @@
+@@ -99,20 +99,20 @@
install-config:
$(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)
@@ -32,3 +32,8 @@
install-commandmode:
$(INSTALL) -m 775 $(COMMAND_OPTS) -d $(DESTDIR)$(LOGDIR)/rw
+- chmod g+s $(DESTDIR)$(LOGDIR)/rw
++# chmod g+s $(DESTDIR)$(LOGDIR)/rw
+
+ fullinstall: install install-init install-commandmode
+
diff --git a/net/netsaint/files/patch-ae b/net/netsaint/files/patch-ae
index 6cbf9e2..37f2c6d 100644
--- a/net/netsaint/files/patch-ae
+++ b/net/netsaint/files/patch-ae
@@ -1,11 +1,11 @@
---- configure.in Fri Apr 7 11:11:34 2000
-+++ configure.in.new Mon Jun 5 16:09:21 2000
+--- configure.in.orig Mon Apr 30 17:22:35 2001
++++ configure.in Tue May 1 19:36:54 2001
@@ -1,7 +1,7 @@
- dnl Process this file with autoconf to produce a configure script.
+ dnl Process this -*-m4-*- 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_CONFIG_HEADER(common/config.h common/snprintf.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.
-
+ AC_PROG_INSTALL
diff --git a/net/netsaint/files/patch-ai b/net/netsaint/files/patch-ai
index ef3b63b..1820da9 100644
--- a/net/netsaint/files/patch-ai
+++ b/net/netsaint/files/patch-ai
@@ -1,5 +1,5 @@
---- daemon-init.in.orig Sun Feb 18 23:33:21 2001
-+++ daemon-init.in Tue Apr 3 20:58:18 2001
+--- daemon-init.in.orig Sat Mar 24 19:58:26 2001
++++ daemon-init.in Tue May 1 19:38:52 2001
@@ -68,12 +68,9 @@
@@ -16,12 +16,12 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
-@@ -101,7 +98,7 @@
+@@ -102,7 +99,7 @@
start)
echo "Starting network monitor: netsaint"
- su $Netsaint -c "touch $NetsaintVar/netsaint.log $NetsaintSav"
+ su -m $Netsaint -c "touch $NetsaintVar/netsaint.log $NetsaintSav"
+ rm -f $NetsaintCmd
$NetsaintBin -d $NetsaintCfg
if [ -d $NetsaintLckDir ]; then touch $NetsaintLckDir/$NetsaintLckFile; fi
- sleep 1
diff --git a/net/netsaint/pkg-install b/net/netsaint/pkg-install
new file mode 100644
index 0000000..52af9cc
--- /dev/null
+++ b/net/netsaint/pkg-install
@@ -0,0 +1,68 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+PKG_PREFIX=${PKG_PREFIX:=/usr/local}
+
+user=netsaint
+group=netsaint
+
+ask() {
+ local question default answer
+
+ question=$1
+ default=$2
+ if [ -z "${PACKAGE_BUILDING}" ]; then
+ read -p "${question} [${default}]? " answer
+ fi
+ if [ x${answer} = x ]; then
+ answer=${default}
+ fi
+ echo ${answer}
+}
+
+yesno() {
+ local dflt question answer
+
+ question=$1
+ dflt=$2
+ while :; do
+ answer=$(ask "${question}" "${dflt}")
+ case "${answer}" in
+ [Yy]*) return 0;;
+ [Nn]*) return 1;;
+ esac
+ echo "Please answer yes or no."
+ done
+}
+
+if [ x"$2" = xPRE-INSTALL ]; then
+ if /usr/sbin/pw groupshow "${group}" 2>/dev/null; then
+ echo "You already have a group \"${group}\", so I will use it."
+ else
+ echo "You need a group \"${group}\"."
+ if yesno "Would you like me to create it" y; then
+ /usr/sbin/pw groupadd ${group} -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+ fi
+
+ if /usr/sbin/pw user show "${user}" 2>/dev/null; then
+ echo "You already have a user \"${user}\", so I will use it."
+ else
+ echo "You need a user \"${user}\"."
+ if yesno "Would you like me to create it" y; then
+ /usr/sbin/pw useradd ${user} -g ${group} -h - -d ${PKG_PREFIX}/var/netsaint \
+ -s /nonexistent -c "Netsaint pseudo-user" || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+ fi
+
+fi
diff --git a/net/netsaint/pkg-plist b/net/netsaint/pkg-plist
index d71e872..fd71eef 100644
--- a/net/netsaint/pkg-plist
+++ b/net/netsaint/pkg-plist
@@ -2,7 +2,7 @@
@exec mkdir -p %D/var/netsaint/rw
@exec chmod 775 %D/var/netsaint %D/var/netsaint/archives %D/var/netsaint/rw
@exec chown netsaint:netsaint %D/var/netsaint %D/var/netsaint/archives
-@exec chown nobody:nogroup %D/var/netsaint/rw
+@exec chown netsaint:nogroup %D/var/netsaint/rw
bin/netsaint
etc/netsaint/commands.cfg.dist
etc/netsaint/hosts.cfg.dist
@@ -291,3 +291,4 @@ share/netsaint/stylesheets/trends.css
@unexec rmdir %D/var/netsaint/archives 2>/dev/null || true
@unexec rmdir %D/var/netsaint/rw 2>/dev/null || true
@unexec rmdir %D/var/netsaint 2>/dev/null || true
+@unexec rmdir %D/var 2>/dev/null || true
diff --git a/net/netsaint/scripts/createuser b/net/netsaint/scripts/createuser
deleted file mode 100644
index 0ebde3c..0000000
--- a/net/netsaint/scripts/createuser
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/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:/var/netsaint:/sbin/nologin\"" );
-
-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 );
-}
OpenPOWER on IntegriCloud