Date: Sat, 31 Jul 2004 18:19:44 +0300 From: Mike Makonnen <mtm@identd.net> To: Andrey Chernov <ache@nagual.pp.ru>, Oliver Eikemeier <eikemeier@fillmore-labs.com> Cc: current@FreeBSD.ORG Subject: Re: RFC: Alternate patch to have true new-style rc.d scripts in ports (without touching localpkg) Message-ID: <20040731151944.GA23710@rogue.acs-et.com> In-Reply-To: <20040731150542.GA5612@nagual.pp.ru> References: <20040731104933.GA1312@rogue.acs-et.com> <03C7D82F-E2F5-11D8-9C56-00039312D914@fillmore-labs.com> <20040731145616.GA14576@rogue.acs-et.com> <20040731150542.GA5612@nagual.pp.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jul 31, 2004 at 07:05:42PM +0400, Andrey Chernov wrote: > On Sat, Jul 31, 2004 at 05:56:16PM +0300, Mike Makonnen wrote: > > On Sat, Jul 31, 2004 at 03:24:56PM +0200, Oliver Eikemeier wrote: > > > Lets be realistic: Nearly nobody wants his scripts to be sourced in the > > > startup shell, especially not in /usr/local/etc/rc.d. People who really > > > want to do this are experts that exactly know what they are doing, and > > > are not easily confused. > > > > *sigh* You cannot arbitrarily declare that "nearly nobody wants his > > scripts to be sourced in the startup shell". You have no idea of knowing > > what a user might want to do with his system and what his level of > > expertise is. > > That argument is against your position. I don't think so... read on > If you have no idea, user (i.e. > script) can do _anything_, I mean easily damage startup shell even without > evil intentions. You know example - apache13. We need minimal protection, > separating base scripts level and ports scripts level, I mean executing > them in the subshells. You are right, that is the reason why there is a distinction between scripts that have a .sh, and those that don't. If you really want your script to be sourced in the same shell, then you give it a .sh extension. Otherwise, it will be sourced in a subshell. So, when portmgr has finished with the ports rc.d plumbing the apache script will be installed without a .sh extension, and will thus be sourced in a subshell. Cheers. -- Mike Makonnen | GPG-KEY: http://www.identd.net/~mtm/mtm.asc mtm@identd.net | Fingerprint: AC7B 5672 2D11 F4D0 EBF8 5279 5359 2B82 7CD4 1F55 mtm@FreeBSD.Org| FreeBSD - Unleash the Daemon !
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040731151944.GA23710>