From alan@oolong.camellia.org  Thu Jan 14 13:13:13 1999
Received: from oolong.camellia.org (oolong.camellia.org [206.119.96.100])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA09197
          for <FreeBSD-gnats-submit@freebsd.org>; Thu, 14 Jan 1999 13:13:11 -0800 (PST)
          (envelope-from alan@oolong.camellia.org)
Received: (from alan@localhost)
	by oolong.camellia.org (8.8.8/8.8.8+Erasmus) id QAA08360;
	Thu, 14 Jan 1999 16:12:01 -0500 (EST)
	(envelope-from alan)
Message-Id: <14Jan1999.151125.Alan@LCS.MIT.EDU>
Date: Thu, 14 Jan 1999 16:12:01 -0500 (EST)
From: Alan Bawden <Alan@LCS.MIT.EDU>
Sender: Alan@LCS.MIT.EDU
Reply-To: Alan Bawden <Alan@LCS.MIT.EDU>
To: FreeBSD-gnats-submit@freebsd.org
Subject: I suggest a better warning for /etc/rc.conf
X-Send-Pr-Version: 3.2

>Number:         9496
>Category:       misc
>Synopsis:       I suggest a better warning for /etc/rc.conf
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 14 13:20:00 PST 1999
>Closed-Date:    Fri Mar 5 02:36:13 PST 1999
>Last-Modified:  Fri Mar  5 02:38:49 PST 1999
>Originator:     Alan Bawden
>Release:        FreeBSD 2.2.6-RELEASE i386
>Organization:
ITS Preservation Society
>Environment:
FreeBSD 2.2.6-RELEASE i386
>Description:

	The comment at the front of /etc/rc.conf does not explain that the
	file is actually read and re-written by /stand/sysinstall.

>How-To-Repeat:

	Install FreeBSD, then decide to edit some customizations into
	/etc/rc.conf.  As you start to edit, you will notice a comment
	that says:

	  # All arguments must be in double or single quotes.

	Notice that, while this does give you a little twinge that you
	might not understand everything going on here, it does not actually
	deter you from writing all kinds of things that sysinstall won't be
	able to parse.

>Fix:
	
	I would replace the comment as follows:

	  # This file is sometimes parsed and re-written by
	  # /stand/sysinstall.  Because of this, all values must be written
	  # surrounded by double quotes, and there is no way to specify a
	  # value that contains a double quote.  If this rules out
	  # something that you want to do, put your hack in
	  # /etc/rc.conf.local -- sysinstall doesn't look there.

	I removed the reference to single quotes, because my reading of
	sysinstall suggests that they don't actually work.  I.e., you might
	be tempted to write

	  foo='bar"baz'

	thinking you had found a way to specify a value containing a double
	quote, but the first time sysinstall processes this, it will write
	out:

	  foo="bar"baz"

	Which will be mis-parsed by -both- sh and sysinstall.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: sheldonh 
State-Changed-When: Fri Mar 5 02:36:13 PST 1999 
State-Changed-Why:  
Only applies to legacy branch 2.2. Neither STABLE nor CURRENT sysinstall  
overwrites /etc/rc.conf . 

Originator is happy for us to close the PR. 
>Unformatted:
