Conventions for variables names in rc.d scripts

Florent Thoumie flz at FreeBSD.org
Thu Jun 1 04:35:35 PDT 2006


I'd like to make the following changes in rc.d scripts.

- Make all script-local all variable names begin with the "_${name}_"
prefix.
- Make all functions-local variable names begin with the "_" prefix and
use the "local" keyword.

This would avoid potential collision with rc.conf variables and other
variables defined in rc.subr or network.subr that aren't declared local.

Later I'd like to use the "local" keyword as much as possible in rc.subr
and network.subr.

Are there strong objections against these changes?

On a different matter, I've noticed that some of our scripts have
"#!/bin/sh -" shebang line instead of "#!/bin/sh" and just couldn't find
a good reason for this. Anybody knows why?

-- 
Florent Thoumie
flz at FreeBSD.org
FreeBSD Committer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-rc/attachments/20060601/bf80f161/attachment.pgp


More information about the freebsd-rc mailing list