From owner-freebsd-current@FreeBSD.ORG Sat Jul 19 07:55:17 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 48C8E106566B; Sat, 19 Jul 2008 07:55:17 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from cs1.cs.huji.ac.il (cs1.cs.huji.ac.il [132.65.16.10]) by mx1.freebsd.org (Postfix) with ESMTP id DB15B8FC12; Sat, 19 Jul 2008 07:55:16 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by cs1.cs.huji.ac.il with esmtp id 1KK6uh-000Cdi-2L; Sat, 19 Jul 2008 10:31:31 +0300 X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.2 To: Doug Barton In-reply-to: <4881795A.4070604@FreeBSD.org> 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> Comments: In-reply-to Doug Barton message dated "Fri, 18 Jul 2008 22:19:22 -0700." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 19 Jul 2008 10:31:31 +0300 From: Danny Braniss Message-ID: Cc: 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: Sat, 19 Jul 2008 07:55:17 -0000 > 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.) > > There are 144 scripts in /etc/rc.d/ on HEAD right now. Out of those I > count roughly 40 that I actually need, so let's round off to 100 > unnecessary scripts to make the math easy. On my system (a pretty fast > C2D) it takes roughly .3 seconds of wall clock time to run one script > that is not enabled. Now cut that roughly in half since each of those > scripts will not have to suck in /etc/rc.subr and /etc/rc.conf* when > run at boot time, and that's 15 seconds of boot time that I could save > on average, let's say +/- 5 seconds. That's worth giving some thought to. > what if rcorder could provide the list of only those scripts that have 'script_enable="yEs", thus reducing the number of execs? > 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. :) > > Another thing that would work for systems that a more sophisticated > admin/user updates with mergemaster would be to write a pre-compare > script that removes all the scripts you know you don't need from the > temproot/etc/rc.d so that they don't get installed. Of course the > benefit of that would not be nearly as wide spread, but it would also > not result in so much foot-shooting. > > > So far each script is started, sucks in routines plus rc.conf > > We're actually a little smarter than that. :) rc.subr and > rc.conf[.local] are loaded once by rc, then each script that runs > inherits those values. > > hth, > > Doug > > -- > > This .signature sanitized for your protection > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" >