Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Jul 2004 13:21:30 +0400
From:      Andrey Chernov <ache@nagual.pp.ru>
To:        Mike Makonnen <mtm@identd.net>
Cc:        Joe Marcus Clarke <marcus@FreeBSD.ORG>
Subject:   Re: [Fwd: Recent changes to rc.d on -CURRENT]
Message-ID:  <20040727092130.GA93929@nagual.pp.ru>
In-Reply-To: <20040727064438.GA1403@rogue.acs-et.com>
References:  <1090870254.6881.31.camel@shumai.marcuscom.com> <20040726193539.GA76196@nagual.pp.ru> <1090871921.6881.49.camel@shumai.marcuscom.com> <20040726214357.GA80423@nagual.pp.ru> <1090878694.6881.78.camel@shumai.marcuscom.com> <20040726220821.GA80533@nagual.pp.ru> <20040727064438.GA1403@rogue.acs-et.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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/



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