From bill@duchess.wagill.com  Mon Jul 29 22:42:23 1996
Received: from duchess.wagill.com (archer.wagill.com [198.182.208.69])
          by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id WAA20998
          for <FreeBSD-gnats-submit@freebsd.org>; Mon, 29 Jul 1996 22:42:21 -0700 (PDT)
Received: (from bill@localhost) by duchess.wagill.com (8.6.12/8.6.12.A) id WAA05110; Mon, 29 Jul 1996 22:45:36 -0700
Message-Id: <199607300545.WAA05110@duchess.wagill.com>
Date: Mon, 29 Jul 1996 22:45:36 -0700
From: "William A. Gill" <bill@duchess.wagill.com>
Reply-To: bill@duchess.wagill.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: Possible bug in /etc/rc
X-Send-Pr-Version: 3.2

>Number:         1443
>Category:       conf
>Synopsis:       Possible bug in /etc/rc
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 29 22:50:00 PDT 1996
>Closed-Date:    Mon Jul 29 22:54:36 PDT 1996
>Last-Modified:  Mon Jul 29 23:50:00 PDT 1996
>Originator:     William A. Gill
>Release:        FreeBSD 2.1-STABLE i386
>Organization:
>Environment:

	P-75 CPU, PCI M/B, 16 MB MM, 1.6 GB EIDE HD, Mitsumi 2X CDROM,
	Linksys ISA ethernet adaptor, Diamon SpeedStar video, Multitec
	28.8 modem.

>Description:

	The /etc/rc file contains the pattern X"NO" repeatedly.  However,
	there is a place where the pattern is "XNO".  Is this a bug?
	(I am new to FreeBSD, so not sure of the full syntax of statements
	in /etc/rc).  Following is the area in /etc/rc with this pattern:

	# $namedflags is imported from /etc/sysconfig
	if [ "X${namedflags}" != "XNO" ]; then
		echo -n ' named';               named $namedflags
	fi


>How-To-Repeat:

	

>Fix:
	
	Should this really be:

	# $namedflags is imported from /etc/sysconfig
	if [ "X${namedflags}" != X"NO" ]; then
	        echo -n ' named';               named $namedflags
	fi

	???

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: asami 
State-Changed-When: Mon Jul 29 22:54:36 PDT 1996 
State-Changed-Why:  
This is not a bug.  X"NO" and "XNO" (and XNO) have no differences 
in shell syntax. 

From: "Jordan K. Hubbard" <jkh@time.cdrom.com>
To: bill@duchess.wagill.com
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: conf/1443: Possible bug in /etc/rc 
Date: Mon, 29 Jul 1996 23:30:48 -0700

 > 	The /etc/rc file contains the pattern X"NO" repeatedly.  However,
 > 	there is a place where the pattern is "XNO".  Is this a bug?
 
 No, though it is a gratuitous inconsistency and thus worth correcting.
 Done.  Thanks for noticing.

From: J Wunsch <j@uriah.heep.sax.de>
To: bill@duchess.wagill.com
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: conf/1443: Possible bug in /etc/rc
Date: Tue, 30 Jul 1996 08:26:23 +0200 (MET DST)

 As William A. Gill wrote:
 
 > 	(I am new to FreeBSD, so not sure of the full syntax of statements
 > 	in /etc/rc).
 
 You're apparently new to Unix at all.
 
 > 	# $namedflags is imported from /etc/sysconfig
 > 	if [ "X${namedflags}" != "XNO" ]; then
 > 		echo -n ' named';               named $namedflags
 > 	fi
 
 :)
 
 Nope.  The quotes are being stripped before the arguments will be
 passed to the utility (the name of the utility is unobvioulsy `test'
 in this case).  Thus
 
 	X"NO"
 	"XNO"
 	XNO
 	"X"NO
 
 are all the same.  The quotes around XNO aren't strictly necessary at
 all, those around the variable (``${namedflags}'' above) will prevent
 the shell from splitting the argument into multiple words if the
 variable contains ``white space''.
 
 I'm going to close the PR if noone beats me on this.
 
 -- 
 cheers, J"org
 
 joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
 Never trust an operating system you don't have sources for. ;-)
>Unformatted:
