Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Apr 2011 09:25:03 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        Jeremy Chadwick <freebsd@jdc.parodius.com>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: ZFS vs OSX Time Machine
Message-ID:  <201104290925.03607.jhb@freebsd.org>
In-Reply-To: <20110428215954.GA34030@icarus.home.lan>
References:  <537A8F4F-A302-40F9-92DF-403388D99B4B@gsoft.com.au> <201104281727.04425.jhb@freebsd.org> <20110428215954.GA34030@icarus.home.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday, April 28, 2011 5:59:54 pm Jeremy Chadwick wrote:
> I've seen cases where entries in /boot/loader.conf throw parser errors
> during loader(8) when quotes aren't used.  The man page denotes that
> quotes are required, which doesn't appear to be true?  Possibly the
> parser only throws errors if non-numeric/non-integer values (e.g.
> strings) are specified without quotes.
> 
> It's interesting that in the BUGS section of the man page the syntax
> shown for hw.ata.ata_dma=0 also ""violates"" the ""required"" syntax.

Yes, it's confusing.  My gut instinct is that quotes are only required
if the value contains whitespace.  I've certainly used
'autoboot_delay=NO' without quotes before.

I just did some tests and it looks like quotes are only required for
values that contain whitespace, so

foo=bar
bar=42G
baz="foo bar"

are fine, but

baz=foo bar

will fail.

This is similar to normal shell syntax for assigning to variables.

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104290925.03607.jhb>