ports/139064: [PATCH] net/freeradius2: rc.d script should deal with non-forking daemon

Craig Leres leres at ee.lbl.gov
Tue Sep 22 17:50:01 UTC 2009


>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 at 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
 
 



More information about the freebsd-ports-bugs mailing list