rc(8) script -- waiting for the network to become usable

Nerius Landys nlandys at gmail.com
Tue Apr 27 17:44:48 UTC 2010


> On Mon, Apr 26, 2010 at 01:08:15AM -0700, Jeremy Chadwick wrote:
>> Foremost, sorry for the cross-post, but more eyes in this case means
>> overall more discussion.  Secondly, please keep me CC'd as I'm not on
>> either -rc or -net.
>>
>> I recently proposed addition of a new script to the rc framework which
>> verifies (using ping) that layer 3 network connectivity is up/functional
>> before continuing on with daemons which require network access:
>>
>> http://lists.freebsd.org/pipermail/freebsd-stable/2010-April/056400.html
>>
>> The overall response was positive, with full acknowledgement that this
>> is indeed a hack -- yet necessary -- and that something more appropriate
>> could probably be introduced into the base system to provide a much
>> cleaner solution (launchd was mentioned).
>>
>> I'd like folks (particularly on -rc) to chime in here, and please see
>> about adding this to the base system.
>
> Given that this would fix the problems many users see in the current
> world order and that it's relativly unintrusive I think it's an ok thing
> to add.

I was having problems with services such as ntpd starting before the
network came up on my server.  I wrote a similar script in
/usr/local/etc/rc.d/ that pings one of the root name servers for 100
seconds or until it responds, whichever comes first.  It fixed my
problem.

So, yeah, a script to do this would be most welcome.


More information about the freebsd-rc mailing list