#!/bin/sh # # Load the time from the network when the dial-up (PPP) interface is brought up. # # Copy this script to /etc/ppp/ip-up.d/ntpdate # and run chmod 755 /etc/ppp/ip-up.d/ntpdate # both as root. # Edit the TIMESERVER variable and use your ISP's time server if your ISP offers # one. # # Volker Kuhlmann # 28 Aug; 14 Sep 2005; 30 Oct 2006 # ( COUNTRY=NZ TIMESERVER=$COUNTRY.pool.ntp.org sleep 15 # This is run from pppd - there is no environment set. export PATH=/sbin:/usr/sbin:/bin:/usr/bin:"$PATH" # ntpdate will fail if ntpd is running. # SuSE 9.3? and above restart? the ntpd when the PPP link comes up. ntpdate $TIMESERVER # >/dev/null 2>&1 ) &