diff options
author | dougb <dougb@FreeBSD.org> | 2010-03-27 14:04:41 +0800 |
---|---|---|
committer | dougb <dougb@FreeBSD.org> | 2010-03-27 14:04:41 +0800 |
commit | 8e271e9fa1cec635d3e517862641269e59a0d241 (patch) | |
tree | a9944c78a21ccb9558ffb5287e37739baf906e87 | |
parent | ab5101d763f90f03f92a2f8e452f2dbd92a406b4 (diff) | |
download | freebsd-ports-gnome-8e271e9fa1cec635d3e517862641269e59a0d241.tar.gz freebsd-ports-gnome-8e271e9fa1cec635d3e517862641269e59a0d241.tar.zst freebsd-ports-gnome-8e271e9fa1cec635d3e517862641269e59a0d241.zip |
Standardize the rc.d script
-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" + |