Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Sep 2009 10:22:46 -0700
From:      Craig Leres <leres@ee.lbl.gov>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/139064: [PATCH] net/freeradius2: rc.d script should deal with non-forking daemon
Message-ID:  <4AB907E6.3060401@ee.lbl.gov>
Resent-Message-ID: <200909221750.n8MHo1fg037203@freefall.freebsd.org>

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

>Number:         139064
>Category:       ports
>Synopsis:       [PATCH] net/freeradius2: rc.d script should deal with non-forking daemon
>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 Sep 22 17:50:01 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Craig Leres
>Release:        FreeBSD 7.1-RELEASE i386
>Organization:
Lawrence Berkeley National Laboratory
>Environment:
    FreeBSD monrad.lbl.gov 7.2-RELEASE FreeBSD 7.2-RELEASE #3: Fri Jun
26 16:34:37 PDT 2009
leres@fun.ee.lbl.gov:/usr/src/7.2-RELEASE/sys/i386/compile/LBLSMP  i386

>Description:
	If you start radiusd with the single server mode flag
	(-s) it does not fork. This means that if you need to use
	single server mode, the rc.d script doesn't exit, thus
        blocking the startup of other scripts in /usr/local/etc/rc.d.

>How-To-Repeat:
	radiusd_enable="YES"
	radiusd_flags="-s"

>Fix:
	Create an explicit radiusd_start() function; patch attached.





--------------030508060409040308060608
Content-Type: text/plain;
 name="radiusd.sh-patch.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="radiusd.sh-patch.txt"

--- files/radiusd.sh.in.virgin	2008-07-28 06:14:17.000000000 -0700
+++ files/radiusd.sh.in	2009-09-22 09:58:19.000000000 -0700
@@ -19,6 +19,8 @@
 
 command=%%PREFIX%%/sbin/radiusd
 
+start_cmd="radiusd_start"
+
 # In debug mode, radiusd doesn't create a pid file, so comment pidfile and
 # let rc.subr use a process check on procname (which defaults to command).
 #pidfile=/var/run/radiusd/radiusd.pid
@@ -37,6 +39,12 @@
 
 radiusd_enable=${radiusd_enable-"NO"}
 
+# Needs a custom start proc because -s suppresses fork'ing
+radiusd_start()
+{
+	echo 'Starting radiusd'
+	${command} ${radiusd_flags} &
+}
 
 radiusd_debug()
 {

--------------030508060409040308060608--
>Release-Note:
>Audit-Trail:
>Unformatted:
 This is a multi-part message in MIME format.
 --------------030508060409040308060608
 Content-Type: text/plain; charset=ISO-8859-1
 Content-Transfer-Encoding: 7bit
 
 



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