Subject: Re: Is setting ntpdate in rc.conf `safe` in all cases?
To: Tomasz Luchowski <zuntum@netbsd.org>
From: Simon Burge <simonb@wasabisystems.com>
List: netbsd-users
Date: 10/22/2001 00:35:34
Tomasz Luchowski wrote:

> Hi,
> 
> I'd like to set ntpdate=YES in my rc.conf file, but I wonder if it's
> `safe` in all cases. I guess that for example when no network connectivity
> would be available, ntpdate would just exit, and not wait forever
> trying to resolve/connect to the given server. I'd like to be entirely
> sure that it wouldn't prevent my box from starting properly
> in that cases. Can anyone comment on this?

Perhaps the longest delay will be waiting for any DNS timeouts if you
have a netword card configured.  If you can live with a minute or two
delay, you don't need to do any more.

I _think_ dhclient can call a script once it obtains a lease, which
implies the network is up (although I've never used this feature - if it
exists).  If this is possible, you could have "ntpdate=NO" in rc.conf,
but have "/etc/rc.d/ntpdata forcestart" in the script that dhclient runs
(the "force" prefix making it ignore the =NO in rc.conf).

Simon.
--
Simon Burge                            <simonb@wasabisystems.com>
NetBSD CDs, Support and Service:    http://www.wasabisystems.com/