On Sun, Nov 11, 2012 at 9:12 PM, Zoran Kolic <zko...@sbb.rs> wrote:
> It might sound stupid, but I'd like to know if there's
> any difference. Are those 3 line the same?
> WITH_KMS=YES
> WITH_KMS="YES"
> WITH_KMS=yes
With regard to their use in /etc/rc.conf, no, absolutely not.
In general, from my experience, only the second one will work.
This might, or might not, be true for other uses, but rc.conf is
pretty picky about this.
> With regard to their use in /etc/rc.conf, no, absolutely not.
> In general, from my experience, only the second one will work.
Yep, in rc.conf only the second one. I was thinking of make.conf.
It is the place kms should be set. Loader conf might take only
"" versions also.
Thank you and best regards
On Sun, Nov 11, 2012 at 9:29 PM, Zoran Kolic <zko...@sbb.rs> wrote:
> > > WITH_KMS=YES
> > > WITH_KMS="YES"
> > > WITH_KMS=yes
> > With regard to their use in /etc/rc.conf, no, absolutely not.
> > In general, from my experience, only the second one will work.
> Yep, in rc.conf only the second one. I was thinking of make.conf.
> It is the place kms should be set. Loader conf might take only
> "" versions also.
> Thank you and best regards
A minor detail, but the line does not belong in rc.conf (a shell script),
but in /etc/make.conf (a Makefile). Normally you don't use quotation marks
in that case, but it really does not matter in this case as the presence of
"WITH_KMS=" is the significant part. I believe that "WITH_KMS=no" and
"WITH_KMS=yes" are equivalent.
-- R. Kevin Oberman, Network Engineer
E-mail: kob6...@gmail.com
_______________________________________________
freebsd-sta...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
On 12 Nov 2012 05:20, "Kurt Buff" <kurt.b...@gmail.com> wrote:
> On Sun, Nov 11, 2012 at 9:12 PM, Zoran Kolic <zko...@sbb.rs> wrote:
> > It might sound stupid, but I'd like to know if there's
> > any difference. Are those 3 line the same?
On Mon, Nov 12, 2012 at 08:29:27AM +0000, Chris Rees wrote:
> On 12 Nov 2012 05:20, "Kurt Buff" <kurt.b...@gmail.com> wrote:
> > On Sun, Nov 11, 2012 at 9:12 PM, Zoran Kolic <zko...@sbb.rs> wrote:
> > > It might sound stupid, but I'd like to know if there's
> > > any difference. Are those 3 line the same?
> > With regard to their use in /etc/rc.conf, no, absolutely not.
> > In general, from my experience, only the second one will work.
> > This might, or might not, be true for other uses, but rc.conf is
> > pretty picky about this.
> All three are fine in make.conf and rc.conf
> The issue with rc.conf is when people put spaces around the = sign.
> Chris
Indeed /etc/rc (executed by /bin/sh) accepts all three forms because
quotes are optional in /bin/sh and /etc/rc.subr (sourced by /etc/rc)
matches the value against "[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1".
Also, the FreeBSD makefiles and sources test all WITH_* variables with
.ifdef or #ifdef so the value doesn't matter and can even be empty.
White space around the = is permitted too (but not in rc.conf!).
However, things are different when people start using tools to maintain
rc.conf/make.conf. If not written with the above in mind, these tools
may have problems parsing these files.
It's good practice to be consistent and use a canonical form that
matches the documentation or example files as this is probably the
syntax that is guarenteed to not confuse such tools. In other words:
"Be conservative in what you send [write], liberal in what you accept".
> On Mon, Nov 12, 2012 at 08:29:27AM +0000, Chris Rees wrote:
> > On 12 Nov 2012 05:20, "Kurt Buff" <kurt.b...@gmail.com> wrote:
> > > On Sun, Nov 11, 2012 at 9:12 PM, Zoran Kolic <zko...@sbb.rs> wrote:
> > > > It might sound stupid, but I'd like to know if there's
> > > > any difference. Are those 3 line the same?
> > > With regard to their use in /etc/rc.conf, no, absolutely not.
> > > In general, from my experience, only the second one will work.
> > > This might, or might not, be true for other uses, but rc.conf is
> > > pretty picky about this.
> > All three are fine in make.conf and rc.conf
> > The issue with rc.conf is when people put spaces around the = sign.
> > Chris
> Indeed /etc/rc (executed by /bin/sh) accepts all three forms because
> quotes are optional in /bin/sh and /etc/rc.subr (sourced by /etc/rc)
> matches the value against "[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1".
> Also, the FreeBSD makefiles and sources test all WITH_* variables with
> .ifdef or #ifdef so the value doesn't matter and can even be empty.
> White space around the = is permitted too (but not in rc.conf!).
> However, things are different when people start using tools to maintain
> rc.conf/make.conf. If not written with the above in mind, these tools
> may have problems parsing these files.
> It's good practice to be consistent and use a canonical form that
> matches the documentation or example files as this is probably the
> syntax that is guarenteed to not confuse such tools. In other words:
> "Be conservative in what you send [write], liberal in what you accept".
Doesn't sound like a very good tool if it can't handle quoting and capital
letters, but I accept the principle.
Quotes in Makefiles are often harmful, so good practice IMO is to only use
them when necessary.
On Mon, Nov 12, 2012 at 10:24:57AM +0000, Chris Rees wrote:
> On 12 Nov 2012 08:55, "Paul Schenkeveld" <free...@psconsult.nl> wrote:
> > On Mon, Nov 12, 2012 at 08:29:27AM +0000, Chris Rees wrote:
> > > On 12 Nov 2012 05:20, "Kurt Buff" <kurt.b...@gmail.com> wrote:
> > > > On Sun, Nov 11, 2012 at 9:12 PM, Zoran Kolic <zko...@sbb.rs> wrote:
> > > > > It might sound stupid, but I'd like to know if there's
> > > > > any difference. Are those 3 line the same?
> > > > With regard to their use in /etc/rc.conf, no, absolutely not.
> > > > In general, from my experience, only the second one will work.
> > > > This might, or might not, be true for other uses, but rc.conf is
> > > > pretty picky about this.
> > > All three are fine in make.conf and rc.conf
> > > The issue with rc.conf is when people put spaces around the = sign.
> > > Chris
> > Indeed /etc/rc (executed by /bin/sh) accepts all three forms because
> > quotes are optional in /bin/sh and /etc/rc.subr (sourced by /etc/rc)
> > matches the value against "[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1".
> > Also, the FreeBSD makefiles and sources test all WITH_* variables with
> > .ifdef or #ifdef so the value doesn't matter and can even be empty.
> > White space around the = is permitted too (but not in rc.conf!).
> > However, things are different when people start using tools to maintain
> > rc.conf/make.conf. If not written with the above in mind, these tools
> > may have problems parsing these files.
> > It's good practice to be consistent and use a canonical form that
> > matches the documentation or example files as this is probably the
> > syntax that is guarenteed to not confuse such tools. In other words:
> > "Be conservative in what you send [write], liberal in what you accept".
> Doesn't sound like a very good tool if it can't handle quoting and capital
> letters, but I accept the principle.
> Chris
I wouldn't want to verify all home-grown scripts written by sysadmins
around the Internet though.
> Quotes in Makefiles are often harmful, so good practice IMO is to only use
> them when necessary.
For Makefiles yes, quotes are not part of the assignment syntax but
appear in the expansion of the macros so be careful. For sh compatible
config files better use them for clarity and parsability although I
realize that then differences between " and ' come into play too.
On Mon, Nov 12, 2012 at 12:29 AM, Chris Rees <utis...@gmail.com> wrote:
> On 12 Nov 2012 05:20, "Kurt Buff" <kurt.b...@gmail.com> wrote:
>> On Sun, Nov 11, 2012 at 9:12 PM, Zoran Kolic <zko...@sbb.rs> wrote:
>> > It might sound stupid, but I'd like to know if there's
>> > any difference. Are those 3 line the same?
> On Mon, Nov 12, 2012 at 12:29 AM, Chris Rees <utis...@gmail.com> wrote:
> > On 12 Nov 2012 05:20, "Kurt Buff" <kurt.b...@gmail.com> wrote:
> >> On Sun, Nov 11, 2012 at 9:12 PM, Zoran Kolic <zko...@sbb.rs> wrote:
> >> > It might sound stupid, but I'd like to know if there's
> >> > any difference. Are those 3 line the same?
On Mon, Nov 12, 2012 at 7:51 AM, Chris Rees <utis...@gmail.com> wrote:
> On 12 Nov 2012 15:35, "Kurt Buff" <kurt.b...@gmail.com> wrote:
> > On Mon, Nov 12, 2012 at 12:29 AM, Chris Rees <utis...@gmail.com> wrote:
> > > On 12 Nov 2012 05:20, "Kurt Buff" <kurt.b...@gmail.com> wrote:
> > >> On Sun, Nov 11, 2012 at 9:12 PM, Zoran Kolic <zko...@sbb.rs> wrote:
> > >> > It might sound stupid, but I'd like to know if there's
> > >> > any difference. Are those 3 line the same?