Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Apr 2011 00:35:31 +0200
From:      Mikael Fridh <frimik@gmail.com>
To:        Jeremy Chadwick <freebsd@jdc.parodius.com>
Cc:        freebsd-stable@freebsd.org, John Baldwin <jhb@freebsd.org>
Subject:   Re: ZFS vs OSX Time Machine
Message-ID:  <BANLkTi=nPBBfrKojzWX3RGB2S-jSPpJgGA@mail.gmail.com>
In-Reply-To: <20110428215954.GA34030@icarus.home.lan>
References:  <537A8F4F-A302-40F9-92DF-403388D99B4B@gsoft.com.au> <20110428195601.GA31807@icarus.home.lan> <201104281727.04425.jhb@freebsd.org> <20110428215954.GA34030@icarus.home.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Apr 28, 2011 at 11:59 PM, Jeremy Chadwick
<freebsd@jdc.parodius.com> wrote:
>
> I've seen cases where entries in /boot/loader.conf throw parser errors
> during loader(8) when quotes aren't used. =A0The man page denotes that
> quotes are required, which doesn't appear to be true? =A0Possibly 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=3D0 also ""violates"" the ""required"" syntax.
>
> So the question is: what's reality, and would better documentation
> suffice?

My reality:

zfs_load=3D"YES"
vfs.root.mountfrom=3D"zfs:zroot"
vfs.root.mountfrom.options=3Drw
vfs.zfs.debug=3D1
geom_mirror_load=3D"YES"
ahci_load=3D"YES"

... works.

And I've used even more sloppy syntax on occasion, basically I've left
out quotes on pretty much all values which are pure alphanumeric.

loader.conf(5) does say:
> All settings have the following format:
> variable=3D"value"

but it also says it's format was defined explicitly to resemble
rc.conf(5) and can be sourced by sh(1), which should mean that quoting
is not required anywhere.
If you read that literally, you should even be able to do this in loader.co=
nf:

some_value=3DVALUE\ WITH\ SPACES

... because that can be sourced by sh(1) and would result in
some_value=3D'VALUE WITH SPACES', but I haven't tried rebooting a
machine with such settings in loader.conf yet and I wouldn't bet on it
working nor would I actually use such madness in loader.conf even if I
could.

--
Mikael



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BANLkTi=nPBBfrKojzWX3RGB2S-jSPpJgGA>