Last revision: 09-Aug-1993 Included in this distribution of XNTP V3 is a configuration file suitable for use under Apple's A/UX Version 3.0.x 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. Now, you need to create the makefiles: % make refconf First of all, you need to edit Config.local to make sure that BINDIR is correct for where you wish the programs to be "installed". The default (and what I use) is /usr/local/etc. Make sure that DEFS_LOCAL and CLOCKDEFS are commented out! After this is done (you should be told that your system is A/UX 3), make xntpd (the options to 'gcc' are held in compilers/aux3.gcc): % make 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. At this point you need to set things up so that 'xntpd' is started upon boot-up. You can do this in 1 of 2 ways: either add entries in /etc/inittab or create and use an /etc/rc.local file. By default, A/UX doesn't have one, so you'll need to add the following to /etc/inittab: net6:2:wait:/etc/syslogd # set to "wait" to run a syslog daemon + jmj0:2:wait:/etc/rc.local 1>/dev/syscon 2>&1 # Local stuff dbg2::wait:/etc/telinit v # turn off init's verbose mode Now, the look of /etc/rc.local is as follows: #!/bin/sh : : rc.local : # @(#)Copyright Apple Computer 1987 Version 1.17 of rc.sh on 91/11/08 15:56:21 (ATT 1.12) # Push line discipline/set the device so it will print /etc/line_sane 1 echo " " echo "Entering rc.local..." set `/bin/who -r` if [ "$7" = 2 ] then /bin/echo " now setting the time..." /usr/local/etc/ntpdate -s -b sleep 5 # # start up xntpd if we want # if [ -f /etc/ntp.conf ] then /bin/echo " setting tick and tickadj..." /usr/local/etc/tickadj -t 16672 -a 54 sleep 5 /bin/echo " starting xntpd..." /usr/local/etc/xntpd <&- > /dev/null 2>&1 sleep 5 fi # fi echo "Leaving rc.local..." There are a few things to notice about the above: o When run, 'ntpdate' forces your clock to the time returned by the host(s) specified by (you'll need to replace this be the IP address(es) of your timehosts. This is good since it gets things close to start off with. o 'tickadj' is also called. This does two things: changes the default value of 'tick' (which the the amount of time, in ms, that is added to the clock every 1/60 seconds) and changes the value of 'tickadj' which the the amount that is added or subtracted from 'tickadj' when adjtime() is called. Now Mac clocks are pretty bad and tend to be slow. Sooo, instead of having A/UX add the default of 16666ms every 1/60th of a second, you want it to add more so that it keeps better time. The above value works for me but your "best" value may be different and will likely require some fooling around to find the best value. A/UX's default value of 'tickadj' is 1666 which is too big for 'xntpd'... so it also needs to be adjusted. Finally, before A/UX and 'xntpd' will work happily together, you need to patch the kernel. This is due to the fact that A/UX attempts to keep the UNIX-software clock and the Mac-hardware clock in sync. Now both of these are too good. Also, 'xntpd' will be attempting to adjust the software clock as well, so having A/UX muck around with it is asking for headaches. What you therefore need to do is tell the kernel _not_ to sync the s/w clock with the h/w one. This is done using 'adb'. The following is a shell script that will do the patch for you: #! /bin/sh adb -w /unix <