
Package Information    nisttime version 5.3, 04/15/95
===================

nisttime - Call the National Institute of Standards telephone time service
           and check or set your system clock

usnotime - Call the U.S. Naval Observatory telephone time service and check
           or set your system clock

Currently this program is designed for Linux, SunOS, and unixware and is
maintained by John Rushford, wjjr@csn.net.

SID or version 5.3 fixes a false 'on time' message if cu(1) fails to make
the call.  Also, I found and now use the proper pre-processor define for Linux.
Added some notes on Taylor UUCP configuration files.

Programs are NOW installed under /usr/local/bin.  If you've used an earlier
version, remove /etc/nisttime, /etc/usnotime, /usr/man/man8/nisttime.8, and
/usr/man/man8/usnotime.8

System Requirements
===================

Linux with Taylor uucp, clock(8), and gcc compiler.
SunOS with uucp and a C compiler.
Unixware 1.x or 2.x, uucp, and SDK C compiler.

A 1200 baud modem and telephone line.  

INSTALLATION
============

For additional details, see the manual page and the source code comments.

You must be root in order to install the programs nisttime, usnotime, 
and their manual pages.  Look at the Makefile. By default, the programs
are installed under /usr/local/bin and the manual pages are installed
at /usr/local/man/man8.  Modify BINDIR and MANDIR if you want them 
elsewhere.  

On Unixware systems with the SDK package, modify the Makefile so that
INSTALL=/usr/ucb/install.

Then use 'make install'.  You should end up with the following files
provided you did not change BINDIR and MANDIR:

    /usr/local/bin/nisttime
    /usr/local/bin/usnotime
    /usr/local/man/man8/nisttime.8
    /usr/local/man/man8/usnttime.8

The telephone numbers for nisttime and usnotime are not compiled into the
program.  I use cu(1) so that I may support a wide variety of UNIX systems.
Also, should the telephone numbers ever change, you won't have to re-compile.
cu(1) is used thusly to call the NIST or USNO:

	cu nisttime
	cu usnotime

You must add the system names and the appropriate telephone numbers to the
uucp/cu configuration file(s).  The system names 'nisttime' and 'usnotime'
are required.  The program expects to be called using these names so that
it can determine which time source you are calling.

The following is an example you might use for HoneyDanBer, HDB, style,
/usr/lib/uucp/Systems, configuration file:

	nisttime Never ACU 1200 13034944774
	usnotime Never ACU 1200 12026530351

SunOS and Unixware both use the HDB style configuration files.  See
"Managing UUCP and Usenet", O'Reilly & Associates, 1989, ISBN 0-937175-48-X
for details on setting up HDB style configuration files.

Taylor UUCP on Linux may use HDB style configuration files as well but, it 
also and most usually uses Taylor UUCP Configuration files, See "Managing
Taylor UUCP" in the "Linux Network Administrators' Guide", 1994, for details.

The following are examples you might try for Taylor UUCP style configuration
files:

	# /usr/lib/uucp/sys - remote systems file.
	system		nisttime
	phone		1-303-494-4774
	port		serial1
	speed		1200
	#
	system		usnotime
	phone		1-202-653-0351
	port 		serial1
	speed		1200


	# /usr/lib/uucp/port - UUCP ports
	# /dev/cua1 (COM2)
	port		serial1
	type		modem
	device		/dev/cua1
	speed		1200
	dialer		hayes
	
	# /usr/lib/uucp/dial
	# hayes modem chat script
	dialer 	hayes
	chat 		"" \date1q0x4&c1&d2&s1s0=0\r OK \datdt\T CONNECT
	chat-fail	BUSY
	chat-fail	ERROR
	chat-fail	NO\sCARRIER
	dtr-toggle	true

AUTOMATICALLY SETTING YOUR SYSTEM TIME
======================================

You may schedule this program from cron to set your system clock whenever
you like.  The following cron entry examples set the system and CMOS clock
each Sunday morning at 02:00 A.M. localtime.  Note, you may set Linux CMOS
clocks to either local or UTC time.

# Call NIST.  Linux with CMOS clock set to localtime, SunOS, and Unixware.
00 02 * * * /usr/local/bin/nisttime -s | mail -s "clock re-set" root
# Call USNO.  Linux with CMOS clock set to localtime, SunOS, and Unixware.
00 02 * * * /usr/local/bin/usnotime -s | mail -s "clock re-set" root
# Call NIST.  Linux with CMOS clock set to UTC, SunOS, and Unixware.
00 02 * * * /usr/local/bin/nisttime -su | mail -s "clock re-set" root
# Call USNO.  Linux with CMOS clock set to UTC, SunOS, and Unixware.
00 02 * * * /usr/local/bin/usnotime -su | mail -s "clock re-set" root


COMMENTS OR SUGGESTIONS
=======================

If you have any suggestions for changes or other comments.  I may be reached
at wjjr@csn.net.
