diff options
-rw-r--r-- | net-mgmt/netustad/Makefile | 2 | ||||
-rw-r--r-- | net-mgmt/netustad/files/netustad.in | 61 |
2 files changed, 19 insertions, 44 deletions
diff --git a/net-mgmt/netustad/Makefile b/net-mgmt/netustad/Makefile index 3dd91a4b9754..eb48e3e6f731 100644 --- a/net-mgmt/netustad/Makefile +++ b/net-mgmt/netustad/Makefile @@ -7,7 +7,7 @@ PORTNAME= netustad PORTVERSION= 0.3.1 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= net-mgmt security MASTER_SITES= http://www.enderunix.org/netustad/ diff --git a/net-mgmt/netustad/files/netustad.in b/net-mgmt/netustad/files/netustad.in index 083dd8c289ae..7d7c768a8b94 100644 --- a/net-mgmt/netustad/files/netustad.in +++ b/net-mgmt/netustad/files/netustad.in @@ -1,53 +1,28 @@ #!/bin/sh -# + # $FreeBSD$ # # PROVIDE: netustad # REQUIRE: NETWORKING SERVERS # BEFORE: DAEMON +# KEYWORD: shutdown # -# Note: -# If you are running an rcNG-System (i.e. FreeBSD 5 and later or after -# having installed the rc_subr-port on an earlier system) you must set -# "netustad_enable=YES" in either /etc/rc.conf, /etc/rc.conf.local or +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: # -# Please see netustad(8), rc.conf(5) and rc(8) for further details. +# netustad_enable (bool): Set to NO by default. +# Set it to YES to enable netustad. + +. /etc/rc.subr -unset rcNG name="netustad" -command=%%PREFIX%%/sbin/netustad -stop_cmd="killall ${name}" - -if [ -f /etc/rc.subr ]; then - . /etc/rc.subr && rcNG=yes -else - if [ -f %%PREFIX%%/etc/rc.subr ]; then - . %%PREFIX%%/etc/rc.subr && rcNG=yes - fi -fi - -if [ "${rcNG}" ]; then - rcvar=`set_rcvar` - load_rc_config ${name} - run_rc_command "$1" -else - case $1 in - start) - if [ -x "${command}" ]; then - echo -n ' netustad ' - ${command} - fi - ;; - stop) - if [ -x "${command}" ]; then - echo -n ' netustad ' - ${stop_cmd} - fi - ;; - *) - echo "usage: `basename $0` {start|stop}" >&2 - exit 64 - ;; - esac - exit 0 -fi +rcvar=${name}_enable + +command=%%PREFIX%%/sbin/${name} + +load_rc_config $name + +: ${netustad="NO"} + +run_rc_command "$1" + |