aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/nfsen-devel/files
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2006-04-25 18:22:23 +0000
committerPav Lucistnik <pav@FreeBSD.org>2006-04-25 18:22:23 +0000
commitd1ace2a653bf5db51c75e5ca7531326cbac60e93 (patch)
treecf2fe6194d61e6074da16d952ac28f04572a8329 /net-mgmt/nfsen-devel/files
parent502affb309685a9af275800f068c3a6a029a1ba1 (diff)
Notes
Diffstat (limited to 'net-mgmt/nfsen-devel/files')
-rw-r--r--net-mgmt/nfsen-devel/files/nfsen.sh.in86
-rw-r--r--net-mgmt/nfsen-devel/files/patch-etc_nfsen-dist.conf15
-rw-r--r--net-mgmt/nfsen-devel/files/patch-install.pl10
3 files changed, 103 insertions, 8 deletions
diff --git a/net-mgmt/nfsen-devel/files/nfsen.sh.in b/net-mgmt/nfsen-devel/files/nfsen.sh.in
new file mode 100644
index 000000000000..83ecfc335215
--- /dev/null
+++ b/net-mgmt/nfsen-devel/files/nfsen.sh.in
@@ -0,0 +1,86 @@
+#! /bin/sh
+#
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=%%PREFIX%%/bin/nfsen.rc
+NAME=nfsen
+
+test -x $DAEMON || exit 0
+
+set -e
+
+case "$1" in
+ start)
+ echo -n "Starting $NAME"
+ $DAEMON start
+ echo "."
+ ;;
+ stop)
+ echo -n "Stopping $NAME "
+ $DAEMON stop
+ echo "."
+ ;;
+ restart|force-reload)
+ #
+ # If the "reload" option is implemented, move the "force-reload"
+ # option to the "reload" entry above. If not, "force-reload" is
+ # just the same as "restart".
+ #
+ echo -n "Restarting $NAME"
+ $DAEMON stop
+ sleep 1
+ $DAEMON start
+ echo "."
+ ;;
+ *)
+ N=/tmp/nfsen-1.2.4.20060325/etc/rc.d/${NAME}.sh
+ # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
+ echo "Usage: $N {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
+#! /bin/sh
+#
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/local/bin/nfsen.rc
+NAME=nfsen
+
+test -x $DAEMON || exit 0
+
+set -e
+
+case "$1" in
+ start)
+ echo -n "Starting $NAME"
+ $DAEMON start
+ echo "."
+ ;;
+ stop)
+ echo -n "Stopping $NAME "
+ $DAEMON stop
+ echo "."
+ ;;
+ restart|force-reload)
+ #
+ # If the "reload" option is implemented, move the "force-reload"
+ # option to the "reload" entry above. If not, "force-reload" is
+ # just the same as "restart".
+ #
+ echo -n "Restarting $NAME"
+ $DAEMON stop
+ sleep 1
+ $DAEMON start
+ echo "."
+ ;;
+ *)
+ N=/tmp/nfsen-1.2.4.20060325/etc/rc.d/${NAME}.sh
+ # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
+ echo "Usage: $N {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/net-mgmt/nfsen-devel/files/patch-etc_nfsen-dist.conf b/net-mgmt/nfsen-devel/files/patch-etc_nfsen-dist.conf
index 999891b1f352..0d260cabe3a4 100644
--- a/net-mgmt/nfsen-devel/files/patch-etc_nfsen-dist.conf
+++ b/net-mgmt/nfsen-devel/files/patch-etc_nfsen-dist.conf
@@ -17,7 +17,7 @@ $FreeBSD$
#
# Where to install the NfSen Perl modules
-$LIBEXECDIR="${BASEDIR}/libexec";
-+$LIBEXECDIR="${BASEDIR}/libexec/%%PORTNAME%%/";
++$LIBEXECDIR="${BASEDIR}/libexec/%%PORTNAME%%";
#
# Where to install the config files
@@ -55,6 +55,15 @@ $FreeBSD$
#
# Where go all the frontend plugins
+@@ -73,7 +73,7 @@
+
+ #
+ # nfdump tools path
+-$PREFIX = '/usr/local/bin';
++$PREFIX = '%%PREFIX%%/bin';
+
+ #
+ # BASEDIR unrelated vars:
@@ -82,7 +82,7 @@
# This may be a different or the same uid than your web server.
# Note: This user must be in group $WWWGROUP, otherwise nfcapd
@@ -64,10 +73,10 @@ $FreeBSD$
# user and group of the web server process
# All netflow processing will be done with this user
-@@ -105,7 +105,7 @@
+@@ -106,7 +106,7 @@
%sources = (
- 'upstream1' => { 'port' => '9995', 'col' => '#0000ff' },
+ 'upstream1' => { 'port' => '9995', 'col' => '#0000ff', 'type' => 'netflow' },
- 'peer1' => { 'port' => '9996', 'col' => '#ff0000' },
+# 'peer1' => { 'port' => '9996', 'col' => '#ff0000' },
);
diff --git a/net-mgmt/nfsen-devel/files/patch-install.pl b/net-mgmt/nfsen-devel/files/patch-install.pl
index dd144f62fb55..4b4113a85cc1 100644
--- a/net-mgmt/nfsen-devel/files/patch-install.pl
+++ b/net-mgmt/nfsen-devel/files/patch-install.pl
@@ -4,26 +4,26 @@ $FreeBSD$
--- install.pl.orig
+++ install.pl
@@ -1,4 +1,4 @@
--#!/usr/bin/perl -I installer-items
+-#!/usr/bin/perl
+#!%%PERL%% -I %%PREFIX%%/libexec/nfsen
#
#
# Copyright (c) 2004, SWITCH - Teleinformatikdienste fuer Lehre und Forschung
-@@ -56,33 +56,7 @@
+@@ -81,33 +81,7 @@
# Get Perl
sub GetPerl {
- my $whichperl;
- my $ans;
-- chomp($whichperl = `which perl`);
-- if ( length $whichperl ) {
+- $whichperl = FindCommand("perl");
+- if ( defined $whichperl ) {
- print "Perl to use: [$whichperl] ";
- chomp($ans = <STDIN>);
- if ( length $ans ) {
- $whichperl = $ans;
- }
- } else {
-- print "No Perl found in PATH. Please specify where to find perl [] ";
+- print "No Perl found in your PATH. Please specify where to find perl [] ";
- chomp($whichperl = <STDIN>);
- }
-