[Fwd: Recent changes to rc.d on -CURRENT]

Andrey Chernov ache at nagual.pp.ru
Tue Jul 27 02:21:33 PDT 2004


On Tue, Jul 27, 2004 at 09:44:39AM +0300, Mike Makonnen wrote:
>
> The rc.d mechanism with respect to sourcing scripts works like this:
>       o scripts ending in '.sh' are sourced in the current subshell
>       o all other scripts are sourced in a subshell.

It is unnecessary complication (innovation). Everybody before localpkg
using knows he can rename his script to anything excepting ending with
.sh. Say, script.sh.old. Now it is executed. Sigh.

> This means that unless a port really requires that it be sourced in
> the parent shell, all startup scripts should be installed without a
> '.sh' extension. This will be even more important since there will
> probably be a mechanism to include ports scripts in the rcorder(8)
> process at boot in the near future.

You should not expect much "play by rules" from ports, practice shows that 
real situation is just opposite and it is not evil intention from porter, 
just some sort of overlooking. Unlike system's rc.d scripts, ports rc.d 
scripts must run with minimal safeguards to not damage something, 
_especially_ whole system, as in real example with apache13. I mean, in 
subshell.

--
Andrey Chernov | http://ache.pp.ru/


More information about the freebsd-ports mailing list