[clug] forcing ntpdate timeout with no network

Ben Nizette bn at niasdigital.com
Sun Nov 1 21:35:21 MST 2009

On Mon, 2009-11-02 at 14:35 +1100, Alex Satrapa wrote:
> On 02/11/2009, at 14:19 , Ben Nizette wrote:
> > The ntpdate "-t" switch supposedly controls timeouts but doesn't fix
> > things in this case.  This switch value works fine if I've got a  
> > network
> > but an invalid server address but doesn't work if I just have no
> > network.
> It's probably DNS getting stuck in this case.  In an ideal world,  
> you'd only run ntpdate if the system had an IP address and could  
> verify connectivity to it's DNS servers.

Yeah I might keep an eye out for proper network connectivity and do just

> One option could be to remove ntpdate from the init scripts and run it  
> as part of the "up" scripts as defined in /etc/network/interfaces - on  
> the assumption that having configured the network means you'll have a  
> DNS server to talk to.

Not a bad plan, but it appears the "up" scripts get called when ifup is
called, whether or not I've got a cable plugged in :-(


> Alex

More information about the linux mailing list