On Thu, Apr 28, 2011 at 11:59 PM, Jeremy Chadwick
<free...@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.  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.
>
> So the question is: what's reality, and would better documentation
> suffice?

My reality:

zfs_load="YES"
vfs.root.mountfrom="zfs:zroot"
vfs.root.mountfrom.options=rw
vfs.zfs.debug=1
geom_mirror_load="YES"
ahci_load="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="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.conf:

some_value=VALUE\ WITH\ SPACES

... because that can be sourced by sh(1) and would result in
some_value='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
_______________________________________________
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"

Reply via email to