Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Aug 2011 21:53:45 GMT
From:      Freddie Cash <fjwcash@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/159636: [patch] [net/freevrrpd] RC script for freevrrpd that conforms to the new RC framework
Message-ID:  <201108092153.p79LrjSE000773@red.freebsd.org>
Resent-Message-ID: <201108092200.p79M0Nsw057071@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         159636
>Category:       ports
>Synopsis:       [patch] [net/freevrrpd] RC script for freevrrpd that conforms to the new RC framework
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 09 22:00:22 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Freddie Cash
>Release:        FreeBSD 8.2
>Organization:
>Environment:
FreeBSD nexus2.sd73.bc.ca 8.2-RELEASE-p2 FreeBSD 8.2-RELEASE-p2 #3 r223614: Thu Jun 30 09:41:20 PDT 2011     root@nexus.sd73.bc.ca:/usr/obj/usr/src/sys/NEXUS  i386
>Description:
The net/freevrrpd port comes with a very basic, old-style RC script, that's installed as a sample file:  /usr/local/etc/rc.d/freevrrpd.sh.sample.

I've created one that follows the new-style RC framework.  It works well in my testing so far.

Perhaps this could be integrated into the port?
>How-To-Repeat:

>Fix:
#!/bin/sh

# PROVIDE: freevrrpd
# REQUIRE: NETWORKING
# BEFORE:  SERVERS
# KEYWORD: shutdown

# Define these freevrrpd_* variables in one of these files:
#       /etc/rc.conf
#       /etc/rc.conf.local
#       /etc/rc.conf.d/freevrrpd
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
#
freevrrpd_enable=${freevrrpd_enable-"NO"}
freevrrpd_flags=${freevrrpd_flags-""}
freevrrpd_pidfile=${freevrrpd_pidfile-"/var/run/freevrrpd.pid"}

. /etc/rc.subr

name="freevrrpd"
rcvar=`set_rcvar`
command="/usr/local/sbin/freevrrpd"

load_rc_config $name

pidfile="${freevrrpd_pidfile}"

start_cmd="echo \"Starting ${name}.\"; ${command}"
stop_cmd="echo \"Stopping ${name}.\"; /bin/kill -TERM $( cat ${freevrrpd_pidfile} ) > /dev/null 2>&1"
restart_cmd="echo \"Restarting ${name}.\"; /bin/kill -TERM $( cat ${freevrrpd_pidfile} ) > /dev/null 2>&1; sleep 5; ${command}"

run_rc_command "$1"


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201108092153.p79LrjSE000773>