From owner-freebsd-current@FreeBSD.ORG Sat Jul 19 13:19:12 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 7454A1065672 for ; Sat, 19 Jul 2008 13:19:12 +0000 (UTC) (envelope-from rnoland@2hip.net) Received: from gizmo.2hip.net (gizmo.2hip.net [64.74.207.195]) by mx1.freebsd.org (Postfix) with ESMTP id 2149D8FC13 for ; Sat, 19 Jul 2008 13:19:11 +0000 (UTC) (envelope-from rnoland@2hip.net) Received: from [192.168.2.69] (c-71-56-39-94.hsd1.ga.comcast.net [71.56.39.94]) (authenticated bits=0) by gizmo.2hip.net (8.13.8/8.13.8) with ESMTP id m6JDJ1dE036272 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 19 Jul 2008 09:19:01 -0400 (EDT) (envelope-from rnoland@2hip.net) From: Robert Noland 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> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-JDedLAgO1kyzS16oDn3h" Organization: 2Hip Networks Date: Sat, 19 Jul 2008 09:18:55 -0400 Message-Id: <1216473536.1991.5.camel@wombat.2hip.net> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 FreeBSD GNOME Team Port X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on gizmo.2hip.net 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 13:19:12 -0000 --=-JDedLAgO1kyzS16oDn3h Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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. >=20 > That wold be a neat trick, how do you propose we accomplish it? (no,=20 > I'm not being snide.) >=20 > There are 144 scripts in /etc/rc.d/ on HEAD right now. Out of those I=20 > count roughly 40 that I actually need, so let's round off to 100=20 > unnecessary scripts to make the math easy. On my system (a pretty fast=20 > C2D) it takes roughly .3 seconds of wall clock time to run one script=20 > that is not enabled. Now cut that roughly in half since each of those=20 > scripts will not have to suck in /etc/rc.subr and /etc/rc.conf* when=20 > run at boot time, and that's 15 seconds of boot time that I could save=20 > on average, let's say +/- 5 seconds. That's worth giving some thought to. >=20 > One way you could do this is to have /etc/rc.d/active and=20 > /etc/rc.d/inactive (and probably an /etc/rc.d/system for critical=20 > stuff that most people shouldn't touch). Then you could have a=20 > vipw-like system to allow users to edit rc.conf that would move the=20 > scripts to the right directory. Of course, this would be fraught with=20 > potential for problems. :) I almost hate to toss this out there, but what about a sys v type rc? You could have the big directory where all of the scripts live, and then a directory where you symlink to all of the scripts that you actually need. Not exactly run levels, but... I'm also quite curious what happened to the project of porting launchd from osx. robert. > Another thing that would work for systems that a more sophisticated=20 > admin/user updates with mergemaster would be to write a pre-compare=20 > script that removes all the scripts you know you don't need from the=20 > temproot/etc/rc.d so that they don't get installed. Of course the=20 > benefit of that would not be nearly as wide spread, but it would also=20 > not result in so much foot-shooting. >=20 > > So far each script is started, sucks in routines plus rc.conf >=20 > We're actually a little smarter than that. :) rc.subr and=20 > rc.conf[.local] are loaded once by rc, then each script that runs=20 > inherits those values. >=20 > hth, >=20 > Doug >=20 --=-JDedLAgO1kyzS16oDn3h Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEABECAAYFAkiB6b8ACgkQM4TrQ4qfRONNvwCeK3/Tp24wXFFoOwGDFqZUayaT IvgAn1grwGpSCDjo5bzu7JQjWYbAwYeM =AeC4 -----END PGP SIGNATURE----- --=-JDedLAgO1kyzS16oDn3h--