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

[ Available lists | Index of freebsd-current | Month of Aug 2009 | Week of 17 Aug 2009 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
David Wolfskill <david@catwhisker.org>
Date
17 Aug 2009 02:58:30
Subject
Re: rc(8) regression. What's the story?
Message-ID
20090817025829.GH74242@bunrab.catwhisker.org

In reply to
Replies

[ Hide this part ]
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@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.


[ Show this part (application/pgp-signature) ]

Elapsed time: 0.134 seconds