If you install the RPM from the 6.1 CD, it puts "xntpd" script in
/etc/rc.d/init.d as well as creating directory /etc/ntp and the config
file /etc/ntp.conf.  You need to create /etc/ntp step-tickers.

It doesn't appear that your script sets the time with nptdate before
starting the xntpd daemon.  I've attached a copy of the 6.1 version at
the end of this message.

    pete peterson

         
> Date: Sat, 18 Mar 2000 10:02:33 -0600 (CST)
> From: Vidiot <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Do you use ntp to set your time?
> 
> 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.

***************************************************************************
/etc/rc.d/init.d/xntpd from 6.1 distribution
***************************************************************************
#!/bin/sh
#
# xntpd         This shell script takes care of starting and stopping
#               xntpd (NTPv3 daemon).
#
# chkconfig: - 55 10
# description: xntpd is the NTPv3 daemon.

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

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

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

[ -x /usr/sbin/xntpd -a -f /etc/ntp.conf ] || exit 0

RETVAL=0

# See how we were called.
case "$1" in
  start)
        # Adjust time to make life easy for xntpd
        if [ -f /etc/ntp/step-tickers ]; then
                echo -n "Syncing time for xntpd. "
                /usr/sbin/ntpdate -s -b -p 8 -u `cat /etc/ntp/step-tickers`
        fi
        # Start daemons.
        echo -n "Starting xntpd: "
        daemon xntpd -A
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/xntpd
        ;;
  stop)
        # Stop daemons.
        echo -n "Shutting down xntpd: "
        killproc xntpd
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/xntpd
        ;;
  status)
        status xntpd
        RETVAL=$?
        ;;
  restart|reload)
        $0 stop
        $0 start
        RETVAL=$?
        ;;
  *)
        echo "Usage: xntpd {start|stop|restart|status}"
        exit 1
esac

exit $RETVAL


-- 
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.

Reply via email to