Subject: Re: rc.d and dhclient and dhclient-exit-hooks
To: Curt Sampson <cjs@cynic.net>
From: Michael Richardson <mcr@sandelman.ottawa.on.ca>
List: tech-userlevel
Date: 09/15/2001 13:10:08
>>>>> "Curt" == Curt Sampson <cjs@cynic.net> writes:
Curt> 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.
Curt> So what you really mean is that it fails for the situation where you
Curt> start with no network and it comes up later, right.
No, I mean that the solution of putting in a flag fails to deal with that
situation.
Curt> If that's correct, this is not anything to do with the rc system. The
Curt> dhclient scripts are what need to deal with starting and stopping things
Curt> when an interface comes up or goes down. So you need to have that script
Curt> check to make sure any other conditions that need to be met are met
Curt> before it does its stuff.
Yes, but that presents a problem.
Curt> In this case, you might be able to check for pid files for the
Curt> various daemons that need to be in place or something like that, or,
Curt> as you said, you can hack it by having an rc script that just creates
Curt> /var/run/rc.complete or something like that and run it as the last thing.
Curt> In any case, your dhclient script just has to sleep 'till that stuff
Curt> appears, if it's not present.
I think that's the only real solution. Have dhclient fork off a script to
look for the right prequisites and sleep until it sees them....
] ON HUMILITY: to err is human. To moo, bovine. | firewalls [
] Michael Richardson, Sandelman Software Works, Ottawa, ON |net architect[
] mcr@sandelman.ottawa.on.ca http://www.sandelman.ottawa.on.ca/ |device driver[
] panic("Just another NetBSD/notebook using, kernel hacking, security guy"); [