From owner-freebsd-current@FreeBSD.ORG Sun Jul 20 10:29:42 2008 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED3811065671 for ; Sun, 20 Jul 2008 10:29:41 +0000 (UTC) (envelope-from Peter.Ross@alumni.tu-berlin.de) Received: from nskntmtas05p.mx.bigpond.com (nskntmtas05p.mx.bigpond.com [61.9.168.149]) by mx1.freebsd.org (Postfix) with ESMTP id 423298FC08 for ; Sun, 20 Jul 2008 10:29:41 +0000 (UTC) (envelope-from Peter.Ross@alumni.tu-berlin.de) Received: from nskntotgx02p.mx.bigpond.com ([124.176.185.159]) by nskntmtas05p.mx.bigpond.com with ESMTP id <20080720102939.DVBH16527.nskntmtas05p.mx.bigpond.com@nskntotgx02p.mx.bigpond.com>; Sun, 20 Jul 2008 10:29:39 +0000 Received: from oldie.bigpond.com ([124.176.185.159]) by nskntotgx02p.mx.bigpond.com with ESMTP id <20080720102937.AWV15862.nskntotgx02p.mx.bigpond.com@oldie.bigpond.com>; Sun, 20 Jul 2008 10:29:37 +0000 Received: from oldie.bigpond.com (localhost [127.0.0.1]) by oldie.bigpond.com (8.14.2/8.14.2) with ESMTP id m6KAUDko000986; Sun, 20 Jul 2008 20:30:13 +1000 (EST) (envelope-from Peter.Ross@alumni.tu-berlin.de) Received: from localhost (petros@localhost) by oldie.bigpond.com (8.14.2/8.14.2/Submit) with ESMTP id m6KAU6KA000983; Sun, 20 Jul 2008 20:30:10 +1000 (EST) (envelope-from Peter.Ross@alumni.tu-berlin.de) X-Authentication-Warning: oldie.bigpond.com: petros owned process doing -bs Date: Sun, 20 Jul 2008 20:30:06 +1000 (EST) From: Peter Ross X-X-Sender: petros@oldie.bigpond.com To: Danny Braniss In-Reply-To: Message-ID: <20080720200229.T894@oldie.bigpond.com> References: <200807172056.08835.naylor.b.david@gmail.com> <487FCA89.2010308@FreeBSD.org> <20080718083725.97823be0tg13fn6s@webmail.leidinger.net> <20080718071806.GV62764@server.vk2pj.dyndns.org> <20080718122928.GD35340@cicely7.cicely.de> <4881795A.4070604@FreeBSD.org> <1216473536.1991.5.camel@wombat.2hip.net> <20080720003343.S23554@oldie.bigpond.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-RPD-ScanID: Class unknown; VirusThreatLevel unknown, RefID str=0001.0A150202.48831392.008C,ss=1,fgs=0 Cc: Doug Barton , Robert Noland , freebsd-current@FreeBSD.org, ticso@cicely.de Subject: Re: rc improvements (wanted?) 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: Sun, 20 Jul 2008 10:29:42 -0000 On Sun, 20 Jul 2008, Danny Braniss wrote: > I went ahead with my idea - to reduce the list rcorder delivers, by > eliminating those that don't have ${name}_enable, and I opened a pandora > box :-) > - dummy dependency like SERVERS/LOGIN don't have ${name}_enable > nor should have. Two options: - Just eliminate the scripts that have the variable, and set it to "no" - A dummy entry in /etc/defaults/rc.conf with "# Don't overwrite this" (So only one who really knows what he is doing will try it - hopefully) > - REQUIERE: xxx complains if xxx is not 'loaded' like in the case > of NETWORKING requirement of ppp which I don't have enabled. Solved by point 1? > - some scripts rely on the existance of a ${file} which is better than > the original /etc/rc which used to run mountd if /etc/exports existed, > but does not 'conform' to the ${name}_enable paradigm. The same? > - some scripts like abi don't have abi_enable, but sysvipc_enable, > linux_enable and svr4_enable. I looked at this. abi is in fact a container for three start scripts. Of course splitting them makes the situation worse.. If the ${name}_enable check becomes a function some special cases could be treated in a case statement case ${name} of mountd) if [ -f /etc/exports ]; then result=1; fi ;; abi) if [ checkyesno sysvipc -o checkyesno linux_enable .. ]; then result=1; fi ;; *) enable=eval \$${name}_enable if [ "X${enable}" = "X" ]; then result=1 else result=`checkyesno ${enable}`; fi ;; esac [That's untested demo code and may contain typos] Unfortunately the rc.d scripts are not self-contained anymore. That may offend some. But there is shared *.subr code already. > All these - and some more that I probably missed - can be fixed, or the > warnings ignored, but is it worthwhile? That's a good question. It is up to the users of "slower" hardware (e.g.embedded devices), I think. Regards Peter