diff options
author | pav <pav@FreeBSD.org> | 2010-04-01 04:58:26 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2010-04-01 04:58:26 +0800 |
commit | 3ceed028ad52497bddf3ddb901456a4e851e43b8 (patch) | |
tree | 45af29cc6912835c95170597fac85d29c8bc69de /net-mgmt | |
parent | 0b79dbf03246ca7984b456817ab51323b091a927 (diff) | |
download | freebsd-ports-gnome-3ceed028ad52497bddf3ddb901456a4e851e43b8.tar.gz freebsd-ports-gnome-3ceed028ad52497bddf3ddb901456a4e851e43b8.tar.zst freebsd-ports-gnome-3ceed028ad52497bddf3ddb901456a4e851e43b8.zip |
- Provide rc.subr script
PR: ports/144384
Submitted by: geoffroy desvernay <dgeo@centrale-marseille.fr>
Approved by: maintainer
- Allow to work with rrdtool 1.4.x
PR: ports/144876
Submitted by: Vincent Hoffman <vince@unsane.co.uk>
Approved by: maintainer
Diffstat (limited to 'net-mgmt')
-rw-r--r-- | net-mgmt/nfsen/Makefile | 4 | ||||
-rw-r--r-- | net-mgmt/nfsen/files/nfsen.in | 24 | ||||
-rw-r--r-- | net-mgmt/nfsen/files/nfsen.sh.in | 86 | ||||
-rw-r--r-- | net-mgmt/nfsen/files/patch-libexec_NfSenRRD.pm | 11 |
4 files changed, 38 insertions, 87 deletions
diff --git a/net-mgmt/nfsen/Makefile b/net-mgmt/nfsen/Makefile index faa71520626c..f5579734ad33 100644 --- a/net-mgmt/nfsen/Makefile +++ b/net-mgmt/nfsen/Makefile @@ -7,6 +7,7 @@ PORTNAME= nfsen PORTVERSION= 1.3.2 +PORTREVISION= 1 CATEGORIES= net-mgmt MASTER_SITES= SF/${PORTNAME}/stable/${PORTNAME}-${PORTVERSION} \ http://nfsen.sourceforge.net/ @@ -24,7 +25,7 @@ USE_PERL5= yes USE_PHP= session pcre sockets NO_BUILD= yes PLIST_SUB+= PORTNAME=${PORTNAME} -USE_RC_SUBR= nfsen.sh +USE_RC_SUBR= nfsen .if defined(PACKAGE_BUILDING) IGNORE= needs running syslogd @@ -35,6 +36,7 @@ post-patch: ${WRKSRC}/etc/nfsen-dist.conf @${RM} ${WRKSRC}/etc/nfsen-dist.conf.* @${REINPLACE_CMD} -e 's,%%PERL%%,${PERL},' -e 's,%%PREFIX%%,${PREFIX},' ${WRKSRC}/install.pl + @${RM} ${WRKSRC}/libexec/NfSenRRD.pm.orig do-install: @${MKDIR} ${PREFIX}/var/${PORTNAME}/profiles/live diff --git a/net-mgmt/nfsen/files/nfsen.in b/net-mgmt/nfsen/files/nfsen.in new file mode 100644 index 000000000000..e418406a065f --- /dev/null +++ b/net-mgmt/nfsen/files/nfsen.in @@ -0,0 +1,24 @@ +#! /bin/sh +# + +# PROVIDE: nfsen +# REQUIRE: sshd +# KEYWORD: shutdown +# +nfsen_enable=${nfsen_enable-"NO"} +#nfsen_flags=${nfsen_flags-""} + +. /etc/rc.subr + +name="nfsen" +rcvar=`set_rcvar` +load_rc_config $name +command="/usr/local/bin/nfsen" +start_cmd="/usr/local/bin/nfsen start" +stop_cmd="/usr/local/bin/nfsen stop" +reload_cmd="/usr/local/bin/nfsen reconfig" +status_cmd="/usr/local/bin/nfsen status" + +extra_commands="reload" + +run_rc_command "$1" diff --git a/net-mgmt/nfsen/files/nfsen.sh.in b/net-mgmt/nfsen/files/nfsen.sh.in deleted file mode 100644 index 7ae388c538ad..000000000000 --- a/net-mgmt/nfsen/files/nfsen.sh.in +++ /dev/null @@ -1,86 +0,0 @@ -#! /bin/sh -# - -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin -DAEMON=%%PREFIX%%/bin/nfsen -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/files/patch-libexec_NfSenRRD.pm b/net-mgmt/nfsen/files/patch-libexec_NfSenRRD.pm new file mode 100644 index 000000000000..6b7a66f7b5d2 --- /dev/null +++ b/net-mgmt/nfsen/files/patch-libexec_NfSenRRD.pm @@ -0,0 +1,11 @@ +--- libexec/NfSenRRD.pm.orig 2010-03-23 15:58:24.953252437 +0000 ++++ libexec/NfSenRRD.pm 2010-03-23 15:58:35.624042719 +0000 +@@ -73,7 +73,7 @@ + if ( $rrd_version < 1.1 ) { # it's RRD 1.0.x + $RRDoffset = 77; + } +- if ( $rrd_version >= 1.2 && $rrd_version < 1.4 ) { ++ if ( $rrd_version >= 1.2 && $rrd_version < 1.5 ) { + $RRDoffset = 67; + } + |