rc(8) regression. What's the story?

David Wolfskill david at catwhisker.org
Mon Aug 17 02:58:30 UTC 2009


On Mon, Aug 17, 2009 at 06:40:28AM +0400, Kamigishi Rei wrote:
> ...
> This happens for me with some interfaces (namely, bge and em) as well; 
> media state is detected with a slight delay and therefore by the time 
> ntpdate is started we don't have an IP address yet.
> ...

Perhaps it might be appropriate to ensure that we have an IP address
before starting ntpd, then?  As far as the actual check, examining the
output of "netstat -nif inet" or "netstat -nif inet6" is generally what
I'd normally do.  Possibilities that come to mind:

* Modify rc.d/netif to ensure that an IP address is assigned before it
  exits (assuming(!) that at least one interface has come up.

* Modify rc.d/ntpd to ensure that an IP address is assigned before it
  tries to start ntpd(8).

* Create a new rc.d script that sleeps until an IP address is assigned.

I think the latter would be most flexible, as the appropriate keywords
could be specified for precisely those rc.d/* scripts that actually need
an IP address in order to function, though implementing it might
engender rather more churn in /etc/rc.d/* than folks might prefer.

Peace,
david
-- 
David H. Wolfskill				david at catwhisker.org
Depriving a girl or boy of an opportunity for education is evil.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20090817/52f69dc1/attachment.pgp


More information about the freebsd-current mailing list