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/14/2001 10:40:40
-----BEGIN PGP SIGNED MESSAGE-----
>>>>> "Curt" == Curt Sampson <cjs@cynic.net> writes:
Curt> On Tue, 11 Sep 2001, Michael Richardson wrote:
>> So, what I really need is a way for an rc script to indicate that it
>> has more stuff to do, but it needs to defer until later ("the end") would be
>> fine.
Curt> I think it would be cleaner to do the following:
Curt> 1. Make your early rc script write a state variable to a file (i.e.,
Curt> /var/run/network-state).
Curt> 2. Create a new rc script that runs at the end (or wherever else you
Curt> want), reads /var/run/network-state, and takes appropriate action based
Curt> on that.
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.
Now, I could have an rc file that writes a file that says "rc processing done"
and wait for that file to appear. We still need the event notification
system.
{Tero Kivinen did one that he sent me a month or so ago and I have yet to
look at. }
] 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"); [
-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: latin1
Comment: Processed by Mailcrypt 3.5.6, an Emacs/PGP interface
iQCVAwUBO6IW5oqHRg3pndX9AQG2OwP/f54CQjgnYj91g5oZaW3IGYqews/Py4K+
mFbxqIa6ZUR2gAY3RLjzeHiiKB2NdmcIyJ0vecpw5K6cGgiKfGnuDFoDJPCtYORW
UlrVuGTLNUMRIf+F+bCMV/lgZ//9CoAgw9LVE7+Tn4ceuVQLxq6XjP9toO2Qi4yi
9FeCip3GRmE=
=Gwma
-----END PGP SIGNATURE-----