Subject: Re: rc.d and dhclient and dhclient-exit-hooks
To: Michael Richardson <mcr@sandelman.ottawa.on.ca>
From: Curt Sampson <cjs@cynic.net>
List: tech-userlevel
Date: 09/15/2001 16:12:22
On Fri, 14 Sep 2001, Michael Richardson wrote:

>   I considered doing this.
>   It fails for the situation where I boot with no network - either because
> there was no network card, it was not connected, there was no DHCPd, I was
> too far from the wireless base station, etc.
>
>   Remember that dhcpd will go into the background and keep trying.

So what you really mean is that it fails for the situation where you
start with no network and it comes up later, right.

If that's correct, this is not anything to do with the rc system. The
dhclient scripts are what need to deal with starting and stopping things
when an interface comes up or goes down. So you need to have that script
check to make sure any other conditions that need to be met are met
before it does its stuff.

In this case, you might be able to check for pid files for the
various daemons that need to be in place or something like that, or,
as you said, you can hack it by having an rc script that just creates
/var/run/rc.complete or something like that and run it as the last thing.
In any case, your dhclient script just has to sleep 'till that stuff
appears, if it's not present.

cjs
-- 
Curt Sampson  <cjs@cynic.net>   +81 3 5778 0123   http://www.netbsd.org
    Don't you know, in this new Dark Age, we're all light.  --XTC