aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net-mgmt/nagios-plugins/Makefile11
-rw-r--r--net-mgmt/nagios-plugins/distinfo2
-rw-r--r--net-mgmt/nagios-plugins/pkg-descr2
-rw-r--r--net-mgmt/nagios-plugins/scripts/createuser49
-rw-r--r--net-mgmt/netsaint-plugins/Makefile11
-rw-r--r--net-mgmt/netsaint-plugins/distinfo2
-rw-r--r--net-mgmt/netsaint-plugins/pkg-descr2
-rw-r--r--net-mgmt/netsaint-plugins/scripts/createuser49
-rw-r--r--net/nagios-plugins/Makefile11
-rw-r--r--net/nagios-plugins/distinfo2
-rw-r--r--net/nagios-plugins/pkg-descr2
-rw-r--r--net/nagios-plugins/scripts/createuser49
-rw-r--r--net/netsaint-plugins/Makefile11
-rw-r--r--net/netsaint-plugins/distinfo2
-rw-r--r--net/netsaint-plugins/pkg-descr2
-rw-r--r--net/netsaint-plugins/scripts/createuser49
16 files changed, 224 insertions, 32 deletions
diff --git a/net-mgmt/nagios-plugins/Makefile b/net-mgmt/nagios-plugins/Makefile
index e321e17cbfd2..f792038c5105 100644
--- a/net-mgmt/nagios-plugins/Makefile
+++ b/net-mgmt/nagios-plugins/Makefile
@@ -6,10 +6,10 @@
#
PORTNAME= netsaint-plugins
-PORTVERSION= 1.2.9.2
+PORTVERSION= 1.2.9.3
CATEGORIES= net
MASTER_SITES= http://download.sourceforge.net/netsaintplug/
-DISTNAME= ${PORTNAME}-1.2.9-2
+DISTNAME= ${PORTNAME}-1.2.9-3
MAINTAINER= blaz@amis.net
@@ -23,10 +23,6 @@ CONFIGURE_ENV= LOCALBASE=${LOCALBASE}
USE_AUTOMAKE= yes
USE_GMAKE= yes
-# make absolutely sure we have the user/group added!
-BUILD_DEPENDS= netsaint:${PORTSDIR}/net/netsaint
-RUN_DEPENDS= netsaint:${PORTSDIR}/net/netsaint
-
.if defined(WANT_QSTAT)
BUILD_DEPENDS+= qstat:${PORTSDIR}/games/qstat
RUN_DEPENDS+= qstat:${PORTSDIR}/games/qstat
@@ -68,4 +64,7 @@ CONFIGURE_ARGS+=--with-mysqllibdir=${LOCALBASE}/lib/mysql
PLIST_SUB+= WANT_MYSQL="@comment "
.endif
+pre-install:
+ ${PERL} ${SCRIPTDIR}/createuser
+
.include <bsd.port.mk>
diff --git a/net-mgmt/nagios-plugins/distinfo b/net-mgmt/nagios-plugins/distinfo
index da402113a6d2..57e3a22ebee0 100644
--- a/net-mgmt/nagios-plugins/distinfo
+++ b/net-mgmt/nagios-plugins/distinfo
@@ -1 +1 @@
-MD5 (netsaint-plugins-1.2.9-2.tar.gz) = 531cd7774bfd2f195f46136dcba1b78f
+MD5 (netsaint-plugins-1.2.9-3.tar.gz) = 2e9928dcb1d522144ba0bb9a98619035
diff --git a/net-mgmt/nagios-plugins/pkg-descr b/net-mgmt/nagios-plugins/pkg-descr
index 0abedd7de10a..da28433b287c 100644
--- a/net-mgmt/nagios-plugins/pkg-descr
+++ b/net-mgmt/nagios-plugins/pkg-descr
@@ -11,6 +11,6 @@ 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.
+to view the current service status, history, etc. via a web browser.
WWW: http://www.netsaint.org/
diff --git a/net-mgmt/nagios-plugins/scripts/createuser b/net-mgmt/nagios-plugins/scripts/createuser
new file mode 100644
index 000000000000..0ebde3c5496d
--- /dev/null
+++ b/net-mgmt/nagios-plugins/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:/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 e321e17cbfd2..f792038c5105 100644
--- a/net-mgmt/netsaint-plugins/Makefile
+++ b/net-mgmt/netsaint-plugins/Makefile
@@ -6,10 +6,10 @@
#
PORTNAME= netsaint-plugins
-PORTVERSION= 1.2.9.2
+PORTVERSION= 1.2.9.3
CATEGORIES= net
MASTER_SITES= http://download.sourceforge.net/netsaintplug/
-DISTNAME= ${PORTNAME}-1.2.9-2
+DISTNAME= ${PORTNAME}-1.2.9-3
MAINTAINER= blaz@amis.net
@@ -23,10 +23,6 @@ CONFIGURE_ENV= LOCALBASE=${LOCALBASE}
USE_AUTOMAKE= yes
USE_GMAKE= yes
-# make absolutely sure we have the user/group added!
-BUILD_DEPENDS= netsaint:${PORTSDIR}/net/netsaint
-RUN_DEPENDS= netsaint:${PORTSDIR}/net/netsaint
-
.if defined(WANT_QSTAT)
BUILD_DEPENDS+= qstat:${PORTSDIR}/games/qstat
RUN_DEPENDS+= qstat:${PORTSDIR}/games/qstat
@@ -68,4 +64,7 @@ CONFIGURE_ARGS+=--with-mysqllibdir=${LOCALBASE}/lib/mysql
PLIST_SUB+= WANT_MYSQL="@comment "
.endif
+pre-install:
+ ${PERL} ${SCRIPTDIR}/createuser
+
.include <bsd.port.mk>
diff --git a/net-mgmt/netsaint-plugins/distinfo b/net-mgmt/netsaint-plugins/distinfo
index da402113a6d2..57e3a22ebee0 100644
--- a/net-mgmt/netsaint-plugins/distinfo
+++ b/net-mgmt/netsaint-plugins/distinfo
@@ -1 +1 @@
-MD5 (netsaint-plugins-1.2.9-2.tar.gz) = 531cd7774bfd2f195f46136dcba1b78f
+MD5 (netsaint-plugins-1.2.9-3.tar.gz) = 2e9928dcb1d522144ba0bb9a98619035
diff --git a/net-mgmt/netsaint-plugins/pkg-descr b/net-mgmt/netsaint-plugins/pkg-descr
index 0abedd7de10a..da28433b287c 100644
--- a/net-mgmt/netsaint-plugins/pkg-descr
+++ b/net-mgmt/netsaint-plugins/pkg-descr
@@ -11,6 +11,6 @@ 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.
+to view the current service status, history, etc. via a web browser.
WWW: http://www.netsaint.org/
diff --git a/net-mgmt/netsaint-plugins/scripts/createuser b/net-mgmt/netsaint-plugins/scripts/createuser
new file mode 100644
index 000000000000..0ebde3c5496d
--- /dev/null
+++ b/net-mgmt/netsaint-plugins/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:/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 e321e17cbfd2..f792038c5105 100644
--- a/net/nagios-plugins/Makefile
+++ b/net/nagios-plugins/Makefile
@@ -6,10 +6,10 @@
#
PORTNAME= netsaint-plugins
-PORTVERSION= 1.2.9.2
+PORTVERSION= 1.2.9.3
CATEGORIES= net
MASTER_SITES= http://download.sourceforge.net/netsaintplug/
-DISTNAME= ${PORTNAME}-1.2.9-2
+DISTNAME= ${PORTNAME}-1.2.9-3
MAINTAINER= blaz@amis.net
@@ -23,10 +23,6 @@ CONFIGURE_ENV= LOCALBASE=${LOCALBASE}
USE_AUTOMAKE= yes
USE_GMAKE= yes
-# make absolutely sure we have the user/group added!
-BUILD_DEPENDS= netsaint:${PORTSDIR}/net/netsaint
-RUN_DEPENDS= netsaint:${PORTSDIR}/net/netsaint
-
.if defined(WANT_QSTAT)
BUILD_DEPENDS+= qstat:${PORTSDIR}/games/qstat
RUN_DEPENDS+= qstat:${PORTSDIR}/games/qstat
@@ -68,4 +64,7 @@ CONFIGURE_ARGS+=--with-mysqllibdir=${LOCALBASE}/lib/mysql
PLIST_SUB+= WANT_MYSQL="@comment "
.endif
+pre-install:
+ ${PERL} ${SCRIPTDIR}/createuser
+
.include <bsd.port.mk>
diff --git a/net/nagios-plugins/distinfo b/net/nagios-plugins/distinfo
index da402113a6d2..57e3a22ebee0 100644
--- a/net/nagios-plugins/distinfo
+++ b/net/nagios-plugins/distinfo
@@ -1 +1 @@
-MD5 (netsaint-plugins-1.2.9-2.tar.gz) = 531cd7774bfd2f195f46136dcba1b78f
+MD5 (netsaint-plugins-1.2.9-3.tar.gz) = 2e9928dcb1d522144ba0bb9a98619035
diff --git a/net/nagios-plugins/pkg-descr b/net/nagios-plugins/pkg-descr
index 0abedd7de10a..da28433b287c 100644
--- a/net/nagios-plugins/pkg-descr
+++ b/net/nagios-plugins/pkg-descr
@@ -11,6 +11,6 @@ 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.
+to view the current service status, history, etc. via a web browser.
WWW: http://www.netsaint.org/
diff --git a/net/nagios-plugins/scripts/createuser b/net/nagios-plugins/scripts/createuser
new file mode 100644
index 000000000000..0ebde3c5496d
--- /dev/null
+++ b/net/nagios-plugins/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:/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 e321e17cbfd2..f792038c5105 100644
--- a/net/netsaint-plugins/Makefile
+++ b/net/netsaint-plugins/Makefile
@@ -6,10 +6,10 @@
#
PORTNAME= netsaint-plugins
-PORTVERSION= 1.2.9.2
+PORTVERSION= 1.2.9.3
CATEGORIES= net
MASTER_SITES= http://download.sourceforge.net/netsaintplug/
-DISTNAME= ${PORTNAME}-1.2.9-2
+DISTNAME= ${PORTNAME}-1.2.9-3
MAINTAINER= blaz@amis.net
@@ -23,10 +23,6 @@ CONFIGURE_ENV= LOCALBASE=${LOCALBASE}
USE_AUTOMAKE= yes
USE_GMAKE= yes
-# make absolutely sure we have the user/group added!
-BUILD_DEPENDS= netsaint:${PORTSDIR}/net/netsaint
-RUN_DEPENDS= netsaint:${PORTSDIR}/net/netsaint
-
.if defined(WANT_QSTAT)
BUILD_DEPENDS+= qstat:${PORTSDIR}/games/qstat
RUN_DEPENDS+= qstat:${PORTSDIR}/games/qstat
@@ -68,4 +64,7 @@ CONFIGURE_ARGS+=--with-mysqllibdir=${LOCALBASE}/lib/mysql
PLIST_SUB+= WANT_MYSQL="@comment "
.endif
+pre-install:
+ ${PERL} ${SCRIPTDIR}/createuser
+
.include <bsd.port.mk>
diff --git a/net/netsaint-plugins/distinfo b/net/netsaint-plugins/distinfo
index da402113a6d2..57e3a22ebee0 100644
--- a/net/netsaint-plugins/distinfo
+++ b/net/netsaint-plugins/distinfo
@@ -1 +1 @@
-MD5 (netsaint-plugins-1.2.9-2.tar.gz) = 531cd7774bfd2f195f46136dcba1b78f
+MD5 (netsaint-plugins-1.2.9-3.tar.gz) = 2e9928dcb1d522144ba0bb9a98619035
diff --git a/net/netsaint-plugins/pkg-descr b/net/netsaint-plugins/pkg-descr
index 0abedd7de10a..da28433b287c 100644
--- a/net/netsaint-plugins/pkg-descr
+++ b/net/netsaint-plugins/pkg-descr
@@ -11,6 +11,6 @@ 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.
+to view the current service status, history, etc. via a web browser.
WWW: http://www.netsaint.org/
diff --git a/net/netsaint-plugins/scripts/createuser b/net/netsaint-plugins/scripts/createuser
new file mode 100644
index 000000000000..0ebde3c5496d
--- /dev/null
+++ b/net/netsaint-plugins/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:/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 );
+}