From nobody@FreeBSD.org  Wed Dec 23 01:05:04 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 41D4D106566C
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 23 Dec 2009 01:05:04 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 3171D8FC18
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 23 Dec 2009 01:05:04 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id nBN154v4070816
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 23 Dec 2009 01:05:04 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id nBN153iX070815;
	Wed, 23 Dec 2009 01:05:03 GMT
	(envelope-from nobody)
Message-Id: <200912230105.nBN153iX070815@www.freebsd.org>
Date: Wed, 23 Dec 2009 01:05:03 GMT
From: Jason Helfman <jgh@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: add rc.conf.d support to /usr/local
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         141909
>Category:       conf
>Synopsis:       rc.subr(8): [patch] add rc.conf.d support to /usr/local
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-rc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 23 01:10:02 UTC 2009
>Closed-Date:    
>Last-Modified:  Wed Feb 27 05:57:45 UTC 2013
>Originator:     Jason Helfman
>Release:        7.2-RELEASE-p4
>Organization:

>Environment:
7.2-RELEASE-p4 FreeBSD 7.2-RELEASE-p4 #0: Fri Oct  2 12:21:39 UTC 2009     root@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
rc.conf.d is not supported under the /usr/local subsystem
>How-To-Repeat:
mkdir -p /usr/local/etc/rc.conf.d/
touch /usr/local/etc/rc.conf.d/sshd
echo enable_sshd=\"YES\" > /usr/local/etc/rc.conf.d/sshd
remove sshd service from /etc/rc.conf or /etc/rc.conf.d/

/etc/rc.d/sshd rcvar --> should show NO
>Fix:
Added patch.

Patch attached with submission follows:

--- src/etc/rc.subr.orig	2009-12-22 16:50:51.000000000 -0800
+++ src/etc/rc.subr	2009-12-22 16:52:46.000000000 -0800
@@ -927,6 +927,11 @@
 		debug "Sourcing /etc/rc.conf.d/${_name}"
 		. /etc/rc.conf.d/"$_name"
 	fi
+
+	if [ -f /usr/local/etc/rc.conf.d/"$_name" ]; then
+		debug "Sourcing /usr/local/etc/rc.conf.d/${_name}"
+		. /usr/local/etc/rc.conf.d/"$_name"
+	fi
 }
   
 #


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-rc 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed Dec 23 01:23:35 UTC 2009 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=141909 

From: Jason Helfman <jhelfman@e-e.com>
To: bug-followup@FreeBSD.org, jhelfman@e-e.com
Cc:  
Subject: Re: conf/141909: rc.subr(8): [patch] add rc.conf.d support to /usr/local
Date: Sun, 16 May 2010 09:46:47 -0700

 To clarify
 
 After removing these variables from either /etc/rc.conf or =
 /etc/rc.conf.d/$name, and having it under =
 /usr/local/etc/rc.conf.d/$name... rcvar should show yes.=20
 
 It wil show NO without the patch I had submitted.=
>Unformatted:
