If you don't use ntp to keep your clock aligned with the National
Bureau of Standards clock, you should.  It is a simple program that
runs as a daemon.  But, it does require a 24x7 net connection.

The latest source is from www.ntp.org.  Just fetch it and install it.
Grab the latest list of timeservers and pick three servers near you that
provide pubic access.  Use level 2 servers, do not use level 1.  After
you put that info in the /etc/ntp.conf file, you can start the daemon.

But, since the source doesn't have (not that I found) and init.d script,
I fixed one up this morning.  It is attached to the message.  Drop it in
/etc/rc.d/init.d and run the following commands:

        chkconfig --add ntpd
        /etc/rc.d/init.d/ntpd start

The startup script has been configured to start after named, i.e., named is
55 and I set ntpd at 57, in the startup sequence.

I've used ntpd for several years now and it is worth having on the system.

Anyone know why RedHat doesn't make it part of the normal install?  If it is,
I didn't see it.

MB
-- 
e-mail: [EMAIL PROTECTED]
    Bart: Hey, why is it destroying other toys?  Lisa: They must have
    programmed it to eliminate the competition.  Bart: You mean like
    Microsoft?  Lisa: Exactly.  [The Simpsons - 12/18/99]
Visit - URL:http://www.vidiot.com/  (Your link to Star Trek and UPN)
#!/bin/sh
#
# ntpd            This shell script takes care of starting and stopping
#                 ntpd (Network Time Protocol daemon).
#
# chkconfig: 345 57 47
# description: The network time protocol for keeping system clock on time.

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

[ -f /usr/local/bin/ntpd ] || exit 0

[ -f /etc/ntp.conf ] || exit 0

RETVAL=0

# See how we were called.
case "$1" in
  start)
        # Start daemons.
        echo -n "Starting ntpd: "
        daemon /usr/local/bin/ntpd
        RETVAL=$?
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ntpd
        echo
        ;;
  stop)
        # Stop daemons.
        echo -n "Shutting down ntpd: "
        killproc ntpd
        RETVAL=$?
        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/ntpd
        echo
        ;;
  status)
        echo "No status available for ntpd."
        exit $?
        ;;
  restart)
        $0 stop
        $0 start
        ;;
  
  *)
        echo "Usage: ntpd {start|stop|restart}"
        exit 1
esac

exit $RETVAL

Reply via email to