From owner-freebsd-hackers Wed Jun 13 18:25:37 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from core.usrlib.org (CC2-861.charter-stl.com [24.217.115.99]) by hub.freebsd.org (Postfix) with ESMTP id 47E4437B405 for ; Wed, 13 Jun 2001 18:25:33 -0700 (PDT) (envelope-from ajh3@core.usrlib.org) Received: by core.usrlib.org (Postfix, from userid 1001) id 795EFA875; Wed, 13 Jun 2001 20:24:15 -0500 (CDT) Date: Wed, 13 Jun 2001 20:24:15 -0500 From: Andrew Hesford To: Gordon Tetlow Cc: Cyrille Lefevre , Jon Parise , Matt Dillon , Will Andrews , Warner Losh , Mark Santcroos , Doug Barton , bsddiy@163.net, freebsd-hackers@FreeBSD.ORG Subject: Re: import NetBSD rc system Message-ID: <20010613202415.A3689@core.usrlib.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from gordont@bluemtn.net on Wed, Jun 13, 2001 at 06:04:23PM -0700 X-Loop: Andrew Hesford Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Jun 13, 2001 at 06:04:23PM -0700, Gordon Tetlow wrote: > On 14 Jun 2001, Cyrille Lefevre wrote: > > > not always. the dependency graph works fine if you start/stop all > > services at once, but not individually such as : > > > > starting nfsd should required mountd but actually, it don't start it. > [snip] > > Yup, I have an idea or two as to how to get around it, but I'm need to > finish getting the framework up and running. I plan to extend a couple of > things. > > Anyway, here's my status: > rcorder ported (one line code change) > /etc/rc ported > /etc/rc.shutdown ported > /etc/rc.subr ported > > I'm currently porting over the /etc/rc.d module scripts. I'm almost up to > the network initialization (which is going to be ugly). It's not hard, > just time consuming (lots of cut and paste). > > I hope to have something useful tomorrow, maybe the next day. Heck, I > might even post it =) > > -gordon What about a script whose sole purpose is to satisfy dependencies? Call it dep_check or something. Any script, e.g., nfsd.sh, that had dependencies to be met could make a call to dep_check. dep_check would scan the calling script (nfsd.sh) and make sure all dependencies were met. This could continue recursively until everything were satisfied. Of course, certain details need to be worked out (like how to tell dep_check what script is calling it). Alternatively, give up the handy feature of being able to start services from their own scripts, and have a wrapper script that starts the specified service and satisfies dependencies. This has the distinct advantage of not having to call dep_check in each dependent script. Furthermore, it allows us to start, say, nfsd.sh, knowing full well that mountd is running, without worrying about some dependency checker trying to start a new mountd. This is a relatively minor issue, and I am sure there are a million equally valid (or more so) solutions to the problem. This is why I leave it to those who are going to implement the system. :) -- Andrew Hesford ajh3@usrlib.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message