Last revision:  10-Jun-1993

Included in this distribution of XNTP V3 is a configuration file suitable
for use under Apple's A/UX Version 2.0.1 or 3.0.  While it may work with
other versions, it has not been tested.  To make the executables follow
the steps outlined below.

*** NOTE:  You must have gcc installed to successfully compile the current
distribution; the native cc supplied with A/UX will NOT correctly compile
this source.  See the FAQ in comp.unix.aux for places to obtain gcc from
and how to install it.

    % mv Config Config.orig
    % cp Config.aux Config

	Now edit the `Config' file to reflect your own preferences.  By
	default, local clock support and Spectracom clock support are included.
	No other clocks have been attempted and will almost surely require
	some changes to the source to work properly.  You may leave out
	support for either the local or Spectracom clocks with no ill effects.
	I cannot recommend using the DEBUG option when the Spectracom clock
	support is included as things will not work properly.

	Authentication using either DES or MD5 appears to work properly and
	these can be omitted as well.

	The `Config' file uses the GNU C compiler gcc.

	The programs are linked with the fast memory allocator and the
	BSD emulation library.  These can be altered by changing the COMPAT
	definition.

    % make makefiles

	Distributes the configuration information and distributes the
	makefiles throughout the directory tree.

    % make

	This will compile all of the sources into the proper executables.

I do not normally use the `make install' option and so have not verified its
compatibility with A/UX.  Rather, I pull out each of the executables and
place them in the locally appropriate locations.

    # vi /etc/rc.local

	I know that A/UX does not have an /etc/rc.local by default, but
	under 2.0.1, I have an entry in my /etc/inittab file which runs
	local sorts of things.  The entry looks like:

		jad0:2:wait:/etc/rc.local       # execute local commands

	The /etc/rc.local file itself contains the following typical sequence
	to start the XNTP stuff.

		if [ -f /etc/ntp.conf ]; then
			/usr/local/bin/tickadj -Aq
			/usr/local/bin/ntpdate -b -o1 some.host.domain
			/usr/local/bin/xntpd <&- >/dev/null 2>&1
			/bin/echo "NTP started\n\r" >/dev/console
		fi

	The tickadj command is needed to alter A/UX's idea of tick.  The
	ntpdate command can be omitted, but is useful at boot time to get
	things relatively close to start with; replace `some.host.domain'
	with something appropriate for your situation.

	It seems that A/UX 3.0 has changed the way that the startup process
	works and so you may be tempted to place the XNTP startup commands
	in the /etc/inittab file itself.  This does appear to work.

    # xntp-aux.patch

	VERY IMPORTANT!  Before running XNTP, you *should* patch the system.
	A/UX does some strange timekeeping things because of the way that
	sound and floppy drive support are included in the system.  This patch
	is in no way endorsed or approved by Apple and you are using it at
	your own risk.  However, Richard Todd, the originator of the patch,
	posted this to the A/UX news group comp.unix.aux quite some time ago
	and has been using it successfully.  Similarly, I have been using it
	for at least six months on both 2.0.1 and 3.0 machines with no
	apparent ill effects.  Without this patch, the Mac keeps LOUSY time;
	with the patch we can be upstanding members of the timekeeping
	community.  This patch MUST be applied every time that you generate
	a new system (i.e., autoconfig, etc.).  I recommend putting the
	file in /usr/local/bin.  You will need to remember to apply the patch
	after every system generation, but before you reboot.

	The patch is given below.

#! /bin/sh
adb -w /unix <<!
time_fix_timeout?4i
time_fix_timeout?w 0x4e75
time_fix_timeout?4i
$q
!

	Save the above sequence of 7 lines as xntp-aux.patch and execute
	it as described.

Good luck!  If you have problems under A/UX feel free to contact me (e-mail
is preferred).

John Dundas
dundas@salt.jpl.nasa.gov

Edit History

04-Mar-1993	Include the source for xntp-patch.aux.
		Patches introduced into ntptrace to support A/UX.

10-Jun-1993	Note on gcc support, lack of support for native cc.
