From sa2c@sa2c.net  Tue Feb 21 07:14:46 2006
Return-Path: <sa2c@sa2c.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 1B86E16A420
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 21 Feb 2006 07:14:46 +0000 (GMT)
	(envelope-from sa2c@sa2c.net)
Received: from sakura.and.or.jp (sakura.and.or.jp [59.106.20.85])
	by mx1.FreeBSD.org (Postfix) with ESMTP id CF1EC43D4C
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 21 Feb 2006 07:14:44 +0000 (GMT)
	(envelope-from sa2c@sa2c.net)
Received: from sakura.and.or.jp (localhost [127.0.0.1])
	by sakura.and.or.jp (Postfix) with ESMTP id E050161C32
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 21 Feb 2006 16:14:42 +0900 (JST)
Received: from berkeley.l.sa2c.net (berkeley.vpn.and.or.jp [10.46.49.3])
	by sakura.and.or.jp (Postfix) with ESMTP id C3C1F61C2D
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 21 Feb 2006 16:14:42 +0900 (JST)
Received: by berkeley.l.sa2c.net (Postfix, from userid 3104)
	id B09671145E; Tue, 21 Feb 2006 16:14:42 +0900 (JST)
Message-Id: <20060221071442.B09671145E@berkeley.l.sa2c.net>
Date: Tue, 21 Feb 2006 16:14:42 +0900 (JST)
From: NIIMI Satoshi <sa2c@sa2c.net>
Reply-To: NIIMI Satoshi <sa2c@sa2c.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] porter's handbook: incorrect example of rc.d script
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         93621
>Category:       docs
>Synopsis:       [patch] porter's handbook: incorrect example of rc.d script
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    dougb
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 21 07:20:03 GMT 2006
>Closed-Date:    Thu May 18 05:06:54 GMT 2006
>Last-Modified:  Thu May 18 05:06:54 GMT 2006
>Originator:     NIIMI Satoshi
>Release:        FreeBSD 6.0-RELEASE-p4 i386
>Organization:
>Environment:
System: FreeBSD berkeley.l.sa2c.net 6.0-RELEASE-p4 FreeBSD 6.0-RELEASE-p4 #3: Thu Feb 2 20:03:08 JST 2006 root@berkeley.l.sa2c.net:/usr/obj/usr/src/sys/GENERIC i386


	
>Description:

The example rc.d script in section 6.15 "Starting and stopping
services (rc scripts)" does not work because it uses variables before
set.

Some ports (security/clamsmtp for example) follow the example and fall
in the pit.

	
>How-To-Repeat:
	
>Fix:

	

--- book.diff begins here ---
Index: book.sgml
===================================================================
RCS file: /home/ncvs/doc/en_US.ISO8859-1/books/porters-handbook/book.sgml,v
retrieving revision 1.681
diff -u -r1.681 book.sgml
--- book.sgml	20 Feb 2006 20:06:36 -0000	1.681
+++ book.sgml	21 Feb 2006 07:06:34 -0000
@@ -5952,7 +5952,7 @@
 rcvar=${name}_enable
 
 command=%%PREFIX%%/sbin/doormand
-command_args="-p $pidfile -f $doormand_config"
+command_args='-p $pidfile -f $doormand_config'
 pidfile=/var/run/doormand.pid
 
 load_rc_config $name
--- book.diff ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-doc->dougb 
Responsible-Changed-By: dougb 
Responsible-Changed-When: Wed Feb 22 02:11:11 UTC 2006 
Responsible-Changed-Why:  

I made this change, so I'll test the fix. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=93621 
State-Changed-From-To: open->closed 
State-Changed-By: dougb 
State-Changed-When: Thu May 18 05:05:25 UTC 2006 
State-Changed-Why:  

Thanks for catching this! I solved the problem a different 
way (see the commit message) in order to make it more clear 
to someone who is not as good at shell scripting as you are. 

:) 

Doug 

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