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.
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:54 UTC