Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Jan 1999 16:12:01 -0500 (EST)
From:      Alan Bawden <Alan@LCS.MIT.EDU>
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   misc/9496: I suggest a better warning for /etc/rc.conf
Message-ID:  <14Jan1999.151125.Alan@LCS.MIT.EDU>

next in thread | raw e-mail | index | archive | help

>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:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 14 13:20:00 PST 1999
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14Jan1999.151125.Alan>