Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 01 Jun 2006 12:35:17 +0100
From:      Florent Thoumie <flz@FreeBSD.org>
To:        freebsd-rc@FreeBSD.org
Subject:   Conventions for variables names in rc.d scripts
Message-ID:  <1149161717.29704.16.camel@mayday.esat.net>

next in thread | raw e-mail | index | archive | help

--=-HmqpF4p7JssWmYuhHtQH
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

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?

--=20
Florent Thoumie
flz@FreeBSD.org
FreeBSD Committer

--=-HmqpF4p7JssWmYuhHtQH
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (FreeBSD)

iD8DBQBEftD1MxEkbVFH3PQRAmedAJ47CHhT5E1bfbsoCde0BbAl/SWcRACbBImq
iC/zykmnk9pE6h0hVGgAXyg=
=nD+V
-----END PGP SIGNATURE-----

--=-HmqpF4p7JssWmYuhHtQH--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1149161717.29704.16.camel>