From wollman@khavrinen.lcs.mit.edu  Wed Nov  8 11:52:46 2000
Return-Path: <wollman@khavrinen.lcs.mit.edu>
Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193])
	by hub.freebsd.org (Postfix) with ESMTP id 02A7E37B479
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  8 Nov 2000 11:52:46 -0800 (PST)
Received: (from wollman@localhost)
	by khavrinen.lcs.mit.edu (8.9.3/8.9.3) id OAA96333;
	Wed, 8 Nov 2000 14:52:44 -0500 (EST)
	(envelope-from wollman)
Message-Id: <200011081952.OAA96333@khavrinen.lcs.mit.edu>
Date: Wed, 8 Nov 2000 14:52:44 -0500 (EST)
From: Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
Reply-To: wollman@khavrinen.lcs.mit.edu
To: FreeBSD-gnats-submit@freebsd.org
Subject: Ports' rc.d files should use rc.conf 
X-Send-Pr-Version: 3.2

>Number:         22698
>Category:       ports
>Synopsis:       Ports' rc.d files should use rc.conf
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    portmgr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          wish
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 08 12:00:02 PST 2000
>Closed-Date:    Sat Nov 15 12:52:50 PST 2003
>Last-Modified:  Sat Nov 15 12:52:50 PST 2003
>Originator:     Garrett Wollman
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
MIT Laboratory for Computer Science
>Environment:

We have several machines which are set up with identical software, for
cold-sparing purposes.  Not all of these machines run the same set of
daemons.  IWNRNI the standard rc.d/foo.sh files checked rc.conf to
find out whether or not they should be enabled.

>Description:

	

>How-To-Repeat:

Install ports with rc.d scripts.

>Fix:

For each port which installs an rc.d script, add the following:

	. /etc/defaults/rc.conf
	source_rc_confs

	case "$portname_enabled" in
	[Yy][Ee][Ss])	: ;;
	*)		exit 1;;
	esac



>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports->nbm 
Responsible-Changed-By: nbm 
Responsible-Changed-When: Wed Nov 8 16:33:39 PST 2000 
Responsible-Changed-Why:  
I'll put this on my task list once the One True Way of  
getting configuration goes in. 

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

From: "David W. Chapman Jr." <dwcjr@inethouston.net>
To: freebsd-gnats-submit@FreeBSD.org, wollman@khavrinen.lcs.mit.edu
Cc:  
Subject: Re: ports/22698: Ports' rc.d files should use rc.conf
Date: Sun, 22 Jul 2001 22:13:47 -0500

 Wouldn't the correct way be to install a blah.sh.sample and ask the user 
 to rename it to blah.sh like some ports currently do?
 

From: Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: ports/22698
Date: Wed, 22 Aug 2001 14:03:57 -0400 (EDT)

 David W. Chapman writes:
 > Wouldn't the correct way be to install a blah.sh.sample and ask the user 
 > to rename it to blah.sh like some ports currently do?
 
 No.  All machines in our system have identical filesystems, except for
 /etc/rc.conf.local (which is a link to the appropriate configuration
 for that machine), and a few other easily-symlinked configuration
 files.
 
 It would be nice if this were fixed.  As it is, I have to re-implement
 (or at least merge) this functionality every time a port is updated.
 
 Right now, I have:
 
 /usr/local/etc/rc.d/010.pgsql.sh:source_rc_confs
 /usr/local/etc/rc.d/cflowd-base.sh:source_rc_confs
 /usr/local/etc/rc.d/cflowd-flowscan.sh:source_rc_confs
 /usr/local/etc/rc.d/isc-dhcpd.sh:source_rc_confs
 /usr/local/etc/rc.d/racoon.sh:source_rc_confs
 /usr/local/etc/rc.d/squid.sh:source_rc_confs
 
 Some of these add additional configuration above and beyond
 enable/disable; e.g., the cflowd scripts use ${cflowd_user} to
 determine under which userid they will run.
 
 -GAWollman
 
Responsible-Changed-From-To: nbm->portmgr 
Responsible-Changed-By: dwcjr 
Responsible-Changed-When: Sat Sep 1 11:07:19 PDT 2001 
Responsible-Changed-Why:  
Over to possible maintainer(not sure if this is feasible) 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=22698 
State-Changed-From-To: open->closed 
State-Changed-By: marcus 
State-Changed-When: Sat Nov 15 12:51:59 PST 2003 
State-Changed-Why:  
The USE_RC_SUBR variable has been added to accommodate this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=22698 
>Unformatted:
