From owner-freebsd-current@FreeBSD.ORG Sat Dec 3 01:07:12 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C724D16A420 for ; Sat, 3 Dec 2005 01:07:12 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: from mail1.fluidhosting.com (mail1.fluidhosting.com [204.14.90.11]) by mx1.FreeBSD.org (Postfix) with SMTP id 608B743D64 for ; Sat, 3 Dec 2005 01:07:09 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: (qmail 65150 invoked by uid 399); 3 Dec 2005 01:07:08 -0000 Received: from unknown (HELO ?192.168.0.5?) (dougb@dougbarton.net@127.0.0.1) by 127.0.0.1 with SMTP; 3 Dec 2005 01:07:08 -0000 Message-ID: <4390EFB6.3090307@FreeBSD.org> Date: Fri, 02 Dec 2005 17:07:02 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 1.5 (Windows/20051025) MIME-Version: 1.0 To: Andrey Chernov , freebsd-current@freebsd.org References: <200512022006.jB2K67AK078509@repoman.freebsd.org> <20051203004057.GA20872@nagual.pp.ru> In-Reply-To: <20051203004057.GA20872@nagual.pp.ru> X-Enigmail-Version: 0.93.1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Subject: Re: cvs commit: src/etc rc rc.shutdown rc.subr src/etc/rc.d localpkg src/sys/sys param.h X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2005 01:07:12 -0000 [ cvs-all is not the place to discuss this, moving to -current. ] Andrey Chernov wrote: > On Fri, Dec 02, 2005 at 08:06:07PM +0000, Doug Barton wrote: >> This dramatically changes the behavior of rc.d/localpkg, as >> all "local" scripts that have the new rc.d semantics are now >> run in the base rcorder, so only scripts that have not been >> converted yet will run in rc.d/localpkg. > > I don't inspect this changes yet, but please don't forget that even > converted to rc.d local scripts are not as safe as system ones and must > run in the subshell to avoid various environment damaging. F.e. apache > change limits to user www. If it happens in the main rc shell, all > following scripts will suffer. There are other examples. I remember we > already hit this problem before, attempting to do similar conversion. Yes, I agree that's a problem. However, it's a problem we have to solve, or else we can't include local scripts in the base rcorder. As I wrote in my previous post, there are roughly 650 ports that install startup scripts, and roughly 350 have been converted to use rc.subr. Thus, they can easily take advantage of installing the scripts as foo instead of foo.sh, and the problem is solved. Once all the ports have been converted, the problem no longer exists. :) (Yes, I realize that this is a long term goal.) By taking all the pain up front in HEAD, we will ferret out the problem scripts fairly quickly. I already sent to the freebsd-ports list an example of how to convert from foo.sh to foo based on OSVERSION, and sent the author of one port that has a problem script a patch for his review. I'm not saying that this transition will be totally without pain, just that the pain can be limited, and ultimately is necessary for progress. Doug