[clug] forcing ntpdate timeout with no network

Dale Shaw dale.shaw at gmail.com
Sun Nov 1 20:33:09 MST 2009

Hi Ben,

On Mon, Nov 2, 2009 at 2:19 PM, Ben Nizette <bn at niasdigital.com> wrote:
> I've got a system which runs ntpdate on startup but if the thing isn't
> connected to a network (not uncommon for this machine) it sits there for
> about a minute before failing.  This is actually long enough that the
> system watchdog gets angry and resets the machine.


Does your NTP configuration file reference an IP address or a name?
Maybe the delay is name lookup-related, rather than NTP. If that's the
case, you could play with resolv.conf.

Have you considered running ntpd as a daemon (only)? I realise this
means it stays resident in memory and may bleat away in the background
when it can't sync time, but at least it's not blocking/delaying
bootup. Not sure I really understand the benefit of an ntpdate-on-boot
on a system with a real time clock. Another option may be a periodic
cron job/script with a simple "do I have network connectivity?" check
at the start.

Lastly, your problem may be distribution/release specific, so it may
help to provide those details. I found references to some ntpdate bugs
but they were all distro-specific and quite old so I didn't bother
referencing them.


More information about the linux mailing list