Subject: Re: Thanks NetBSD
To: None <>
From: Greg Troxel <>
List: netbsd-users
Date: 04/22/2007 20:17:52
Douglas Allan Tutty <> writes:

> On Sun, Apr 22, 2007 at 07:02:19PM -0400, Steven M. Bellovin wrote:
>> rc.d files have REQUIRES and PROVIDE lines; these form a partial
>> ordering.  A command called rcorder turns those into a linear order.
>> See /etc/rc -- it's invoked by init, and starts everything else.
> Right, but the rcorder process seems to me more complex than sysVinit.
> As you say, the REQUIRES and PROVIDE gives a partial ordering but
> there's nowhere that I can just look to see in what order things happen
> the way I can just e.g. ls rc2.d

One can either statically assign priorities, or let the
provides/requires dynamically define and ordering.  So yes, it's more
complex to describe, but it's simpler to set up the system so it works
correctly, and it's more robust against changes.

It's quite easy to find out what the order will be for any set of scripts:

$ cd /etc/rc.d
$ rcorder *

For debugging, it would be easy to add a "echo running $_rc_elem" in
/etc/rc.d, and then you'd see what was being run.