From owner-freebsd-current@FreeBSD.ORG Sat Jul 19 20:32:00 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 2DB22106566C; Sat, 19 Jul 2008 20:32:00 +0000 (UTC) (envelope-from Peter.Ross@bogen.in-berlin.de) Received: from nschwqsrv03p.mx.bigpond.com (nschwqsrv03p.mx.bigpond.com [61.9.189.237]) by mx1.freebsd.org (Postfix) with ESMTP id 679068FC08; Sat, 19 Jul 2008 20:31:59 +0000 (UTC) (envelope-from Peter.Ross@bogen.in-berlin.de) Received: from nschwotgx03p.mx.bigpond.com ([124.176.185.159]) by nschwmtas06p.mx.bigpond.com with ESMTP id <20080719150659.HZUY17148.nschwmtas06p.mx.bigpond.com@nschwotgx03p.mx.bigpond.com>; Sat, 19 Jul 2008 15:06:59 +0000 Received: from oldie.bigpond.com ([124.176.185.159]) by nschwotgx03p.mx.bigpond.com with ESMTP id <20080719150658.MAGT3962.nschwotgx03p.mx.bigpond.com@oldie.bigpond.com>; Sat, 19 Jul 2008 15:06:58 +0000 Received: from oldie.bigpond.com (localhost [127.0.0.1]) by oldie.bigpond.com (8.14.2/8.14.2) with ESMTP id m6JF7Zif024118; Sun, 20 Jul 2008 01:07:35 +1000 (EST) (envelope-from Peter.Ross@bogen.in-berlin.de) Received: from localhost (petros@localhost) by oldie.bigpond.com (8.14.2/8.14.2/Submit) with ESMTP id m6JF7Weg024115; Sun, 20 Jul 2008 01:07:33 +1000 (EST) (envelope-from Peter.Ross@bogen.in-berlin.de) X-Authentication-Warning: oldie.bigpond.com: petros owned process doing -bs Date: Sun, 20 Jul 2008 01:07:32 +1000 (EST) From: Peter Ross X-X-Sender: petros@oldie.bigpond.com To: Robert Noland In-Reply-To: <1216473536.1991.5.camel@wombat.2hip.net> Message-ID: <20080720003343.S23554@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> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-RPD-ScanID: Class unknown; VirusThreatLevel unknown, RefID str=0001.0A150204.48820313.004C,ss=1,fgs=0 X-Mailman-Approved-At: Sat, 19 Jul 2008 21:03:19 +0000 Cc: freebsd-current@FreeBSD.org, Doug Barton , 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: Sat, 19 Jul 2008 20:32:00 -0000 On Sat, 19 Jul 2008, Robert Noland wrote: > On Fri, 2008-07-18 at 22:19 -0700, Doug Barton wrote: > > Bernd Walter wrote: > > > Speaking about small systems, where startup time is more a problem than > > > on 08/15 desktop and server systems. > > > What I would love to see is that scripts like moused, ypserv, lpt, etc > > > are not started if the services are disabled. > > > > That wold be a neat trick, how do you propose we accomplish it? (no, > > I'm not being snide.) > > .. > > One way you could do this is to have /etc/rc.d/active and > > /etc/rc.d/inactive (and probably an /etc/rc.d/system for critical > > stuff that most people shouldn't touch). Then you could have a > > vipw-like system to allow users to edit rc.conf that would move the > > scripts to the right directory. Of course, this would be fraught with > > potential for problems. :) > > I almost hate to toss this out there, but what about a sys v type rc? Usually the scripts are running run_rc_command. This does a checkyesno for the rcvar variable which is usually ${name}_enable. In most of the cases it uses set_rcvar to achieve this. If so, /etc/rc could evaluate ${name}_enable (it already knows them via /etc/rc.conf) before actually calling a script. There are some irregular names amongst the name of the rcvar variable. I am not 100% sure whether same of the scripts set ${name}_enable vaiables implicitly. That could complicate things. I could not find evidence by browsing through them. I also do not know whether there are scripts that actually do something valuable before calling run_rc_command. At the moment it looks to me that these excemptions could be dealt with by adapting the scripts so they meet the standard (running only when ${name}_enable is set). I only looked through some of the /etc/rc.d scripts en detail (+ some greps for rcvar etc. in the directory) so it needs some more investigation. If it works it avoids messing around with symlinks or moving scripts around, and it reduces the scripts that actually run. As a sys admin I really like the BSD way of having everything relevant to my system in one /etc/rc.conf. It is very convenient. Regards Peter