From owner-freebsd-current Thu Oct 26 12:15:28 2000 Delivered-To: freebsd-current@freebsd.org Received: from mail.gmx.net (pop.gmx.net [194.221.183.20]) by hub.freebsd.org (Postfix) with SMTP id 4315437B479 for ; Thu, 26 Oct 2000 12:15:25 -0700 (PDT) Received: (qmail 1620 invoked by uid 0); 26 Oct 2000 19:15:23 -0000 Received: from p3ee2166e.dip.t-dialin.net (HELO speedy.gsinet) (62.226.22.110) by mail.gmx.net with SMTP; 26 Oct 2000 19:15:23 -0000 Received: (from sittig@localhost) by speedy.gsinet (8.8.8/8.8.8) id VAA22582 for freebsd-current@FreeBSD.ORG; Thu, 26 Oct 2000 21:13:07 +0200 Date: Thu, 26 Oct 2000 21:13:07 +0200 From: Gerhard Sittig To: freebsd-current@FreeBSD.ORG Subject: Re: new rc.network6 and rc.firewall6 Message-ID: <20001026211307.V25237@speedy.gsinet> Mail-Followup-To: freebsd-current@FreeBSD.ORG References: <21367.972424567@winston.osd.bsdi.com> <20001025201401.Q25237@speedy.gsinet> <14839.16362.106387.571284@guru.mired.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <14839.16362.106387.571284@guru.mired.org>; from mwm@mired.org on Wed, Oct 25, 2000 at 03:17:46PM -0500 Organization: System Defenestrators Inc. Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, Oct 25, 2000 at 15:17 -0500, Mike Meyer wrote: > Gerhard Sittig writes: > > What's new is: > > - include the general config at the start (and yes, in every > > single script -- but this should be neglectable in terms of > > speed penalty and makes them work separately, too -- which is a > > real big gain!) > > This isn't really new; it's been nagging me for a while. Also, > periodic.conf does this now. I'm not convined it's negligible when > added up over dozens of scripts. I'm planning on taking some > measurements to see how much this really costs. I believe I have a > solution if it turns out to be non-negligible. The "negligible" (you finally got what I meant :) comes IMO from considering how often this would happen. I really dont mind at all if booting would take 10 more seconds or shutdown would do. An hourly cronjob eating two more seconds (under heavy load) is no problem at all. And I feel these time ranges to be estimated in a very generous way and expect them to be much lower in real life. I really would be surprised to be totally wrong in this respect. We're talking about "source"ing config and subroutine files -- the shell text is shared and the script code (file data) already in the cache, we just create a new process and allocate data (copy on write helps here) and stack. > > - maybe include (source) some common code like > > - determining pids belonging to program names > > - starting processes in an supervised or backgrounded or any > > other special way > > - have some printouts, error level summary, etc > > but I don't see FreeBSD having this level of "rc lib" as NetBSD > > has in rc.subr or even RedHat has in /etc/rc.d/functions(sp?). > > So only the sourced rc.conf (default and customized) remains. > > Said solutions works shell functions as well. When you're really afraid of speed you can always do what's usually done with C header files: [ -z "$SOURCED_FLAG" ] && . $SOURCE_FILE When clearing the SOURCED_FLAG variable at boot's / shutdown's end you aren't very confused later and who fiddles with those variables at the command line by hand gets what he deserves. :> > [ ... lib function and service script skeleton snipped ... ] virtually yours 82D1 9B9C 01DC 4FB4 D7B4 61BE 3F49 4F77 72DE DA76 Gerhard Sittig true | mail -s "get gpg key" Gerhard.Sittig@gmx.net -- If you don't understand or are scared by any of the above ask your parents or an adult to help you. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message