[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Restarting NTP

From: Christopher Browne
Subject: Restarting NTP
Date: Wed, 11 Oct 2000 23:39:33 -0500

I'd like to set up a rule that would restart NTP when two conditions
  a) The host is connected to my ISP (no point to bothering if I can't
     get out to an external time source), and
  b) The set of NTP servers the host is _trying_ to sync against _does
     not_ include some of the external ones.

I could evaluate the first via something like:
   PPPCOUNT=`route -n | grep ppp | wc -l`
The latter something like:
   NTPSERVERS=`echo dmpeers | ntpdc | wc -l`
... And I'd want to do something like:

    "if $PPPCOUNT > 0 and $NTPSERVERS < 5; then
      /etc/init.d/ntp restart

I could write an external script that evaluates this; that may well be
the answer I go with.  Is there some way I'd best evaluate this inside
address@hidden - <>
"Motto for a research laboratory: What we work on today, others will
first think of tomorrow." -- Alan Perlis

reply via email to

[Prev in Thread] Current Thread [Next in Thread]