#!/bin/sh # Start up file for ntp # David Rowe 7 Feb 2008 # To change your timezone set /etc/TZ for your timezone and reboot, e.g. # $ echo PST8PDT7 > /etc/TZ # $ reboot # NOTE: for reasons beyond my meagre comprehension ntpdate # needs to be started in the background (with &) when run # as script from /etc/rc, otherwise you get: # # ntpdate[45]: cannot find family compatible socket to send ntp packet case $1 in start) ntpdate pool.ntp.org& date; echo "export TZ=`cat /etc/TZ`" > /etc/profile;; stop) ;; enable) rm -f /etc/rc.d/S30ntp; ln -s /etc/init.d/ntp /etc/rc.d/S30ntp;; disable) rm -f /etc/rc.d/S30ntp;; *) cat <