Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Jun 2001 20:24:15 -0500
From:      Andrew Hesford <ajh3@usrlib.org>
To:        Gordon Tetlow <gordont@bluemtn.net>
Cc:        Cyrille Lefevre <clefevre@redirect.to>, Jon Parise <jon@csh.rit.edu>, Matt Dillon <dillon@earth.backplane.com>, Will Andrews <will@physics.purdue.edu>, Warner Losh <imp@harmony.village.org>, Mark Santcroos <marks@ripe.net>, Doug Barton <DougB@DougBarton.net>, bsddiy@163.net, freebsd-hackers@FreeBSD.ORG
Subject:   Re: import NetBSD rc system
Message-ID:  <20010613202415.A3689@core.usrlib.org>
In-Reply-To: <Pine.BSF.4.33.0106131750560.94127-100000@sdmail0.sd.bmarts.com>; from gordont@bluemtn.net on Wed, Jun 13, 2001 at 06:04:23PM -0700
References:  <lmmvoq3r.fsf@gits.dyndns.org> <Pine.BSF.4.33.0106131750560.94127-100000@sdmail0.sd.bmarts.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010613202415.A3689>