On Sun, Jan 28, 2007 at 12:34:10PM -0800, Mike Bird wrote:
> On Monday 22 January 2007 16:49, Bruno Voigt wrote:
> > Hi,
> > I'm running debian/unstable on my laptop and often the LAN/WLAN is not
> > connected (yet)
> > when the system is starting up - including NTPD.
> >
> > NTPD then seems to discard all unreachable server entries and ends up
> > with no peers left.
> > In some googled doc I found the ntp.conf option "dynamic" to tell it
> > that some peers may become available later on,
> > but the debian ntpd doesnt't seem to understand it - or I don't know how
> > to use it correctly.
> >
> > What is the best way to configure the ntpd in such an environment ?
> 
> Just configure ntpd as normal, but add an hourly cronjob which does
> "/etc/init.d/ntp restart >/dev/null".
> 
> A client has a server on PPPOE where ntpd always fails at the outset.
> Using this, rather than ntpdate, results in the clock staying in sync
> without stepping.  The hwclock is good enough for ntpd after reboot
> (or DSL outage) until the next time the cronjob runs.
> 
 

Or, if you have some scriptable way to tell if the net is up (a ping to
the ntp server?), you could put a script as the last to run in the
network ip-up.d.  Have it sit there polling (intermittant ping?) the
server every minute until it gets a response then /etc/init.d/ntp
restart, then exit.

This would avoid the net-up just after the cron job goes then having to
wait an hour before ntp is connected.

Doug.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to