Subject: Re: dhclient - what's TRT?
To: None <current-users@NetBSD.ORG>
From: Wolfgang Rupprecht <firstname.lastname@example.org>
Date: 02/11/1998 12:18:09
email@example.com (Chris Jones) writes:
> I just used netstart.local. It was called from approximately the right
> place in /etc/rc. Just make sure you call dhclient in the foreground, not
> the background. It needs to block until it gets interfaces configured, at
> which point it backgrounds itself.
This is what I did too, with one embellishment. If the machine didn't
get a good enough dhcp reply, then it wouldn't bother to start the
network daemons either. For a portable that might be used off-net
this saves quite a bit of disk IO, which in turn saves the battery.
Using resolv.conf to key off of should admittedly be done better, but
I didn't have any bright ideas.
Excerpted from /etc/rc, just after call to /etc/netstart:
# are we off the net? overload resolv.conf. sorry. -wsr
if [ ! -f /etc/resolv.conf -a -f /etc/rc-offnet.conf ]
echo "The Network is DOWN. Not starting the army of daemons."
echo "The Network is UP. Starting all the daemons."
The file /etc/rc-offnet.conf is an edited version of /etc/rc.conf that
has most of the daemons marked as NO.