Here is how I set it up:
Make sure /etc/rc.d/rc.ntpd is executable.
Code:
chmod +x /etc/rc.d/rc.ntpd
This is what my /etc/rc.d/rc/ntpd looks like.
Code:
#!/bin/sh
#
# start the Network Time Protocol
#
if [ ${1} = "start" ]
then
# set the clock from a public server
echo "Setting clock from tock.usno.mil..."
/usr/sbin/ntpdate -v 192.5.41.41
sleep 2
echo "Starting Network Time Protocol daemon..."
/usr/sbin/ntpd -l /tmp/ntp.log
elif [ ${1} = "stop" ]
then
echo "Stopping Network Time Protocol daemon..."
pid=`/bin/ps -e | /usr/bin/grep ntp |\
/usr/bin/sed -e 's/^ *//' -e 's/ .*//'`
if [ "${pid}" != '' ]
then
kill ${pid}
fi
fi
Edit your /etc/ntp.conf and add this or your own choice.
Code:
server 192.5.41.41 # tock.usno.navy.mil
server ntp-01.caltech.edu # Caltech border machine
server timekeeper.isi.edu # ISI
Add this to your /etc/rc.d/rc.local
Code:
# Start the NTP daemon
#
if [ -x /etc/rc.d/rc.ntpd ]
then
/etc/rc.d/rc.ntpd start
fi
Start/Restart /etc/rc.d/rc.ntpd
You're all set now............not sure where I found this but it works flawlessly.