#!/bin/sh
#
# Run getdate if the ppp link is up.  Activated by the following cron
# entry, at 17 minutes past every hour:
#   17 *  * * * root /usr/local/etc/adjtime
#
# Sets the CMOS clock time as well.
#
timehosts="comp.vuw.ac.nz actrix.gen.nz"
#
if (ifconfig | grep 'ppp0') ; then
  if /usr/local/bin/getdate -adjust 2 120 $timehosts; then
    /sbin/clock -w
  fi
fi
