ZFS vs OSX Time Machine
Jeremy Chadwick
freebsd at jdc.parodius.com
Sat Apr 30 00:17:29 UTC 2011
On Fri, Apr 29, 2011 at 09:25:03AM -0400, John Baldwin wrote:
> 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.
As usual, thanks for the time you spent checking this out and verifying
what reality is. :-) I'll file a PR to get the man page updated to
reflect things.
I believe what I've seen (re: parsing errors) is the latter case example
you provided (baz=foo bar). So it seems that using quotes is the
overall "safety mechanism" to ensure the value will work, but they're
not required.
--
| Jeremy Chadwick jdc at parodius.com |
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP 4BD6C0CB |
More information about the freebsd-stable
mailing list