BSD 4_3_Reno development
authorCSRG <csrg@ucbvax.Berkeley.EDU>
Sat, 23 Jun 1990 07:17:23 +0000 (23:17 -0800)
committerCSRG <csrg@ucbvax.Berkeley.EDU>
Sat, 23 Jun 1990 07:17:23 +0000 (23:17 -0800)
Work on file usr/src/usr.sbin/amd/amd/ChangeLog
Work on file usr/src/usr.sbin/amd/amd/patchlevel.h
Work on file usr/src/usr.sbin/amd/text/COPYRIGHT
Work on file usr/src/usr.sbin/amd/text/INSTALL
Work on file usr/src/usr.sbin/amd/text/PORTS
Work on file usr/src/usr.sbin/amd/text/README

Synthesized-from: CSRG/cd2/4.3reno

usr/src/usr.sbin/amd/amd/ChangeLog [new file with mode: 0644]
usr/src/usr.sbin/amd/amd/patchlevel.h [new file with mode: 0644]
usr/src/usr.sbin/amd/text/COPYRIGHT [new file with mode: 0644]
usr/src/usr.sbin/amd/text/INSTALL [new file with mode: 0644]
usr/src/usr.sbin/amd/text/PORTS [new file with mode: 0644]
usr/src/usr.sbin/amd/text/README [new file with mode: 0644]

diff --git a/usr/src/usr.sbin/amd/amd/ChangeLog b/usr/src/usr.sbin/amd/amd/ChangeLog
new file mode 100644 (file)
index 0000000..7913af9
--- /dev/null
@@ -0,0 +1,700 @@
+Sat Jun 23 22:12:48 1990  Jan-Simon Pendry  (jsp at beauty)
+
+       * Release 5.2 for Berkeley.
+
+       * (*) Re-organised source code layout.  Now much more complicated.
+
+       * (map.c) code which flushed the kernel name cache is not really
+       needed now that the modify times on the automount directories are
+       correctly updated so ifdef the whole lot.  Remove later...
+
+       * (map.c) make sure that the automount directories modify times
+       are updated when a change occurs so that the nfs client code can
+       decide when to update its name cache.
+
+       * (srvr_nfs.c) fixed bug which caused mounted filesystems to
+       appear down when they were up.
+
+       * YP becomes NIS.
+
+Mon May 28 19:50:34 1990  Jan-Simon Pendry  (jsp at achilles)
+
+       * (amd.tex) substantially updated with more explanation of the
+       theory and more examples.
+
+       * (nfs_stubs.c) statfs now claims to have a single used block.
+       Avoids ambiguity between 100% and 0% full.
+
+       * (nfs_stubs.c) changed to allow the size of symlinks optionally
+       to be accurate wrt the length of the string returned.  Optional
+       because it is cheaper to ignore the length when doing a getattr
+       and just send any length for the readlink.  However, this breaks
+       on some systems (e.g. Ultrix).
+
+       * (mount_fs.c) automount points get marked type "nfs" instead of
+       "ignore".  This is to fix an interaction with getwd().  Can go
+       away when getwd() gets re-written.  Really only applies to SunOS4
+       but change applies to everything to keep consistent across platforms.
+
+       * (mount_fs.c) abstracted out mount options into a table and
+       corresponding loop.
+
+       * (srvr_nfs.c) make sure portmap information is available when
+       needed, not just after a ping has succeeded.  This needed changing
+       after the ping algorithm got changed.
+
+       * (mntfs.c) fixed incorrect reference to mf_error instead of mf_flags.
+
+       * (nfs_start.c) keep track of number of fds in use, so don't run
+       select on system maximum (which is bad news if you have a large
+       system maximum).
+
+       * (host_ops.c) new NFS tree mount filesystem type (ala Sun -hosts).
+
+       * (nfs_ops.c) abstracted out NFS mount code to support host_ops.
+
+       * (afs_ops.c) dfs_readlink now returns the am_node, instead of the
+       link.  This allows getattr to return the correct set of attributes
+       so keeping Ultrix happy.
+
+       * (afs_ops.c) Make certain the hostname field given to mount()
+       does not get too long - otherwise random EINVAL errors occur.
+
+       * Putting closing comments on all #endif's
+
+Sun May 13 16:07:21 1990  Jan-Simon Pendry  (jsp at achilles)
+
+       * (srvr_nfs.c) second rewrite of NFS ping algorithm.
+
+Sun Apr 29 21:12:33 1990  Jan-Simon Pendry  (jsp at achilles)
+
+       * (nfs_stubs.c) re-arranged readlink code to avoid need to
+       pre-mount a direct filesystem whenever possible.
+
+       * (host_ops.c) finally incorporated new module to support /net
+       mount point.
+
+Sat Mar 24 13:18:47 1990  Jan-Simon Pendry  (jsp at achilles)
+
+       * (nfs_stubs.c) workaround added to rename entry point to avoid
+       arguments with NFS client code.
+
+       * (srvr_nfs.c) changed the way NFS pings are done and cleaned up
+       the process for deciding when a server is up or down.  Now there
+       is just a simple time limit on a reply from the server.  The limit
+       is adjusted depending on whether the state of the server is known.
+
+       * (opts.c) fixed bug with ${var/} expansion et al.  Added ${varN}
+       N = 0..7 for use as scratch variables.
+
+       * (mntfs.c) fixed bug in dup_mntfs().
+
+Thu Jan 11 16:56:41 1990  Jan-Simon Pendry  (jsp at achilles)
+
+       * Release 5.1c.
+
+       * (amq*) has new options.  -f flushes the map cache and -m prints
+       information about mounted filesystem and fileservers.
+
+Tue Jan  2 14:44:21 1990  Jan-Simon Pendry  (jsp at achilles)
+
+       * (util.c) am_mounted() patches the path for "direct" mounted
+       filesystems - cosmetic.
+
+       * (afs_ops.c) when possible sets a small kernel attribute cache
+       timeout on the automount points.
+
+       * (nfs_stubs.c) delete() and rmdir() operations implemented.  Used
+       when a mount point is timed out so the kernel name cache gets to
+       know about the changes.  Fixes most ESTALE errors.
+
+       * (nfs_stubs.c) New do_readlink() function added.  This is used to
+       make sure that a filesystem is mounted at the time a link is read
+       in the case of "direct" mounts.  Done so that the length of the
+       link is available when the initial getattr is done on the mountpoint.
+
+       * (sfs_ops.c) Changed implementation to avoid race conditions.
+       The link target is re-arranged so that sublink points to the
+       target and fs always points at ".".
+
+       * Fixed mount flag bug on Ultrix.
+
+       * Added support from Sjoerd Mullender for Alliant FX/4 and Encore
+       Multimax.
+
+Thu Dec  7 17:55:29 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * (afs_ops.c) dfs_readlink now does a new_ttl on the node it
+       returns.
+
+       * (afs_ops.c) next_nonerror_node now implements the task after
+       which it is named.
+
+Tue Nov 28 17:20:52 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * Release 5.1b.
+
+       * (restart.c) Generates link nodes for any unrecognised filesystem
+       types and then marks them so that they are never deleted (since
+       they could never be automounted later).
+
+       * (os-*.h) Irrelevant #undef's deleted.
+
+       * (arch) Now knows about AIX on RTs.
+
+       * (amq.c) Rationalised the output.  Now only gives you what you
+       asked for.
+
+       * (am.h) New macro: FSRV_ISDOWN(fs), which checks whether a
+       fileserver is down.
+
+       * (afs_ops.c) When a mount fails due to a timeout the underlying
+       filesystem is ripped away and replaced with an error fs.  This
+       avoids the possibility of being left with a single error reference
+       to a valid mounted filesystem.
+
+Thu Nov 23 18:04:29 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * (nfs_start.c) Re-order bootstrap sequence to avoid potential
+       deadlock if restart() ends up accessing one of the automount points.
+
+       * (amq.c) Don't produce default mount output if one of the -l, -x
+       or -D options was used.
+
+       * (umount_fs.c) Add alternative unmount routine for 4.4 BSD.
+
+Mon Nov 20 16:22:50 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * (os-bsd44.h) Fixed redefinition of UMOUNT_FS.
+
+       * (info_ndbm.c) Added missing #include <sys/stat.h>.
+
+       * (mapc.c) Fixed typo in ifdef around gdbm config entry.
+
+Sat Nov 18 16:39:13 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * (util.c) If "/" is automounted, make sure it is never timed out.
+
+       * (mtab.c) Missing clock invalidation added in read_mtab (from a file).
+
+       * (mntfs.c) realloc_mntfs simplified.
+
+       * (map.c) Closed a race condition during shutdown when second and
+       subsequent duplicate mounts were deleted prematurely.
+
+       * (afs_ops.c) Duplicate mounts are now given the correct return
+       code.
+
+Fri Nov 17 18:58:18 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * 5.1 Release.
+
+Thu Nov 16 17:57:02 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * (mntfs.c) Make sure inherit mntfs structures are not cached
+       after last reference; otherwise a second reference to the
+       inherited filesystem will get stuck on the inherit rather than the
+       (now) fully mounted filesystem.
+
+       * (am.c, nfs_start.c) After forking the server, make sure the
+       parent does not exit until the automount points are mounted.  This
+       allows a clean sequence during system startup.
+
+       * Initial port to 4.4 BSD.  Several new configuration abstractions
+       were added to make this port possible.
+
+Thu Nov  9 21:42:14 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * (afs_ops.c, opts.c) Added map logging to facilitate mount map
+       debugging without needing a -DDEBUG version of Amd.
+
+       * (afs_ops.c) Make sure the length of the fs_hostname mount
+       parameter does not exceed MAXHOSTNAMESZ.
+
+Wed Nov  8 13:44:02 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * Change the message log format to indicate the severity of the
+       message to allow simpler analysis of the log file.
+
+Tue Nov  7 14:11:36 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * 5.0 Patchlevel 11.
+
+       * (os-bsd44.h) Initial guess at 4.4 BSD definitions.
+
+       * (os-aux.h) Port for Macintosh II from Julian Onions.
+
+       * (amq.c) Output formats cleaned up.  AMQ_MNTTREE is still broken
+       in amq_subr.c though.
+
+       * (afs_ops.c) If a mount timed out, for example an NFS server was
+       down at the time, it was possible for the error code to remain
+       unset thus jamming that mount node in a state from which it could
+       not recover.  Just make sure that the mf_error field gets filled
+       in when an error occurs.
+
+       * (afs_ops.c) strsplit is run over /defaults to avoid problems
+       with whitespace creeping in.
+
+Sun Nov  5 11:50:51 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * (util.c) am_mounted: Added missing initialisation of stats.s_mtime.
+
+Fri Nov  3 17:33:02 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * 5.0 Patchlevel 10.
+
+       * Changed the copyright.
+
+Thu Nov  2 17:07:53 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * 5.0 Patchlevel 9.
+
+       * (opts.c) new option syntax: == != :=
+
+       * (nfs_ops.c) Less caching of filehandles.  Now cached errors are
+       discarded after use.
+
+       * (mtab.c) now attempts to deal with a lack of open file slots (ENFILE).
+
+       * (mount_fs.c) automount entries in the mount table now have a
+       dev= entry in the same way as NFS and UFS.
+
+       * (mntfs.c) mntfs nodes are now cached after the last reference
+       and discarded <ALLOWED_MOUNT_TIME> seconds later.  This avoids
+       thrashing during a mount.
+
+       * (mapc.c) map default cache mode is now selected with
+       "mapdefault", not "default"
+
+       * (amd.tex) numerous clarifications.  Still more work required...
+
+       * (amq_subr.c) now allows the -x option of amq to operate.
+
+       * (afs_ops.c) afs_bgmount now keeps track of which filesystem
+       needed retrying and ensures that the mount node in the
+       continuation correctly points at an unmounted filesystem.  This
+       fixes a problem whereby a valid mounted filesystem could appear to
+       have failed to mount.
+
+       * Configure now gives more of a running commentary and checks
+       whether os-type and arch actually worked.
+
+       * Allow spurious ';'s in a mount location.
+
+Fri Oct 27 14:03:31 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * foo=blah changed to foo:=blah, foo==blah and foo!=blah.
+
+       * -l stderr changed to -l /dev/stderr.
+
+Thu Oct 19 15:34:28 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * 5.0 Patchlevel 6.
+
+       * LOG_INFO messages have been rationalised so that some
+       statistics, graphs and so on can be generated.
+
+       * Transaction ID's for RPC calls are now allocated by the
+       individual callers, rather than from a central pool.  This
+       decreases the load on mount daemons and NFS servers since the
+       same XID is used for retries when needed.
+
+       * Many fine details of the new data structures have been changed.
+       Some areas have been optimized.
+
+Fri Oct 13 12:31:26 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * Restart code re-implemented to work with the new data structures.
+
+       * Fine tuning applied to new NFS server modeling code.
+
+Thu Oct 12 15:57:24 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * Added ${/var} and ${var/} variable expansions.  The first gives
+       the "basename" component of the variable, the latter gives the
+       "dirname" component.  Additionally, spurious /'s are deleted after
+       the variable expansions is complete.
+
+       * Added new -C option to allow the machine's cluster name to be
+       given to amd.  ${cluster} fetches the value and can be used as
+       another selector.
+
+       * Broken the major data struct (am_node) into three layers:
+       am_node (one for each automount node), mntfs (one for each mounted
+       filesystem) and fserver (one for each file server).  Machine
+       up/down state is maintained in the fserver layer.  Filesystem
+       mount/unmount state is maintained in the mntfs layer.  This change
+       fixes the last known major problem caused by the lack of a central
+       focus for filesystem and fileserver status.  There is a dummy file
+       server layer for local filesystems (ufs, link, program, error).
+
+Tue Oct 10 11:15:42 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * 5.0 Patchlevel 5.
+
+       * (nfs_ops.c) the filehandle cache is now flushed when a
+       filesystem is unmounted.  This avoids ending up with stale
+       information if a server bounces.
+
+       * (clock.c) new module to implement callouts.  Many other
+       routines changed to use callouts instead of messing with ttl
+       fields.
+
+Sun Oct  1 17:08:20 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * 5.0 Patchlevel 3 & 4.
+
+       * Numerous cleanups.
+
+Wed Sep 13 14:30:05 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * 5.0 Patchlevel 2.
+
+       * (nfs_ops.c) portmap information is not remembered beyond the
+       basic filehandle cache interval.  That avoids problems when a new
+       portmap and/or rpc.mountd is started and the bound port changes.
+
+       * (mapc.c) cache reloads are automatically done every hour.
+
+       * Removed xlog macro in favour of plog() so that the log level
+       can be reflected through to syslog().  log() routine renamed to
+       plog() which takes an extra parameter indicating the log level.
+
+Tue Sep  5 20:00:19 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * (nfs_ops.c) when a server is known to be down, any cached file
+       handles and port mapping informaton is flushed since that may have
+       changed when it comes back up.
+
+       * (map.c) timeout no longer attempts to unmount a hung mount point.
+
+Mon Sep  4 14:49:18 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * (afs_ops.c) a mount node which timed out during mount is now
+       retained for the normal timeout interval rather than for a short
+       period.  This avoids wasting time retrying mounts from a server
+       which is down.
+
+       * (afs_ops.c) hung mounts are now detected and not used as a
+       duplicate mount - something which defeated the replacement fs
+       scheme.
+
+       * (nfs_ops.c) keepalive's now back-off when a server has gone
+       down.
+
+Thu Aug 31 21:18:35 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * 5.0 Patchlevel 1.
+
+       * Fixed several bugs which showed up in the keepalive
+       implementation when a gateway went down causing
+       a different sequence of errors than usual.
+
+Wed Aug 30 11:29:21 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * (amq.x) now uses a Sun assigned program number.
+
+       * Revision 5.0 - can now start using metaconfig.
+
+Tue Aug 29 14:36:48 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * (os-u3_0.h, os-type) now knows about DECstations (mips).
+
+       * (nfs_stubs.c) Added hooks to readlink entry point to call
+       per-fs readlink routine if it exists, otherwise old behaviour.
+
+       * (afs_ops.c) Added implementation of "type=direct".  This is
+       the same as "type=auto" but is itself the link to the
+       mount point, rather than being a directory containing a list
+       of links to mount points.
+
+Mon Aug 28 17:48:15 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * (afs_ops.c) Changed readdir to workaround a problem on
+       ultrix 3 where it seems to forget that eof has been reached.
+
+Thu Aug 24 15:17:55 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * Created "beta16".
+
+       * (afs_ops.c) /defaults is located along with every key.
+       this makes it possible to update the /defaults in
+       a map and get to use it.
+
+       * (mapc.c) added map cache synchronization support.  if
+       a file or ndbm map is updated the cache is junked so avoiding
+       things getting out of sync.
+
+Wed Aug 23 19:17:52 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * (os-u3_0.h) new file to support Ultrix 3.0
+
+       * (opts.c) allow environment variables to be accessed via
+       the same ${env} syntax used for options & selectors.
+
+Tue Aug 22 13:19:49 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * (opts.c, get_args.c) added support for kernel architecture
+       type to allow /usr/kvm to be automounted under SunOS 4.x.
+
+       * (os-xinu43.h) updated for june '89 release of MORE/bsd.
+
+       * (opts.c) fixed memory allocation problems where some strings
+       may not have been strdup'ed before they were free'ed so causing
+       the malloc arena to get into a twist.  This caused core dumps on
+       some machines and infinite loops on others.
+
+       * (*.c) clock handling is now done by a macro.  Global variable
+       clock_valid is > 0 (ie the time) when valid, 0 if invalid.
+
+       * (map.c) timeout code survived a complete rewrite and is now
+       O(n) rather than O(n^2).
+
+       * (info_hes.c) new database hooks for Hesiod nameserver.
+
+       * (get_args.c) the local sub-domain is picked up from the
+       hostname if it is not specifed with -d.  The subdomain is
+       then stripped from the hostname.
+
+       * (am.c) when a SIGTERM is received, an immediate abort
+       occurs - only the top-level automounts are unmounted; all
+       other mounts stay -- use amd -r to restart.
+
+       * (afs_ops.c) cleaned up key prefix handling.  Again updated
+       the "hostname" string passed to the kernel so that includes
+       the hostname, pid and mount point.
+
+Tue Aug  8 16:05:23 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * (nfs_ops.c) changed the way the file handle cache is managed.
+       No longer gets a race condition between something entering the
+       cache and being used and discard.
+
+Tue Jul 25 20:40:51 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * (map.c) changed fh_to_mp2 so that it does not return
+       ESTALE during shutdown.  it returns ENOENT instead which
+       avoids thrashing with the kernel.
+
+Sun Jul 23 15:06:10 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * (afs_ops.c) make sure the incoming key from the kernel
+       does not contain any characters which could cause trouble
+       during macro expansion (such as `"! etc).
+
+       * (afs_ops.c) fixed contruction of "mtab" entry.
+
+Fri Jul 21 11:01:05 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * (afs_ops.c) some changes to support the new startup
+       shutdown scheme.
+
+       * (map.c) startup and shutdown are now done using the
+       standard interfaces.  Startup is done by creating a
+       private cache map  ";root;" and then doing lookups
+       on all the names in it.  Shutdown is done by forcibly
+       timing out all the mount points including the automount
+       points.
+
+       * (info_*.c) modified to provide interface required by
+       mapc.c module.
+
+       * (mapc.c) new module to implement map caching.  Caching
+       can be controlled by an fs option.  "all" means cache
+       the entire map (if possible).  "inc" means cache things
+       incrementally.  "none" means never cache things.  Each
+       map type has a default caching mode which is used if
+       cache option "default" is used.
+
+Wed Jul 19 16:14:52 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * (sched.c) implements a general sleep/wakeup scheme and uses
+       it for sub-process handling.
+
+       * (nfs_start.c) task_notify() called from where it used to
+       be called.
+
+       * (nfs_ops.c) now implements a non-blocking rpc library.
+       Everything in nfs_ops was changed to use it.  This should
+       not be in this file and will be moved later. 
+
+       * (map.c) if a mount point times out and it is deferred then
+       issue a wakeup so that it can be retried.
+
+       * (map.c) when creating a new mount point fetches the entry
+       "/defaults" from the associated map if no other options are
+       specified.
+
+       * (am.c) implements the -p (print process id) option.
+
+       * (afs_ops.c) a mount attempt now has a time-to-live of twenty
+       seconds.  if only deferred attempts are waiting after that
+       interval the kernel gets sent ETIMEDOUT.
+
+       * (afs_ops.c) the name by which the kernel knows the filesystem
+       has changed from pid%d@host to /mountpoint@host.  That looks
+       better to users who get hit by it.
+
+Fri Jul 14 18:46:16 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * (afs_ops.c) now knows about defered mounts - mounts which
+       are not in progress, not completed, and not failed.
+
+       * (sched.c) added new entry point sched_ast().  This simulates
+       a completed job.  The basic idea is to let something else return
+       to the main scheduling loop with a guarentee that it will be
+       called back when some other action has taken place.
+
+       * (nfs_ops.c) implemented a file handle cache.  The nfs_init
+       routine starts up a request for the filehandle and the mount
+       routine uses it when it arrives.
+
+Thu Jul 13 18:07:58 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * (afs_ops.c) found a race condition between an error occuring
+       and the am_node being timed out.  Fixed by updating the
+       time-to-live and keepalive counters in the node whenever
+       AMF_MOUNTING is cleared.  Also changed afs_lookuppn() so that
+       it doesn't destroy the node when it returns the error code.
+       This stops thrashing and the node is eventually timed out.
+       Now the only way a node gets deleted is by the timeout code
+       which seems more elegant.
+
+Tue Jul 11 15:36:44 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * Created "beta15".
+
+       * Fixed *all* references to "u2.2".  Some where missed in
+       the original change.  They are now u2_2.
+
+       * (mk-amd-map.c) new command.  Converts plain files into
+       ndbm databases for use by the info_ndbm module.  Hooks
+       included for future support for gdbm just as soon as I
+       can get a copy.
+
+Sun Jul  9 19:00:22 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * Created "beta14".
+
+       * (get_info.c) code to handle yp and files now split into
+       new files info_yp.c and info_file.c  New support for ndbm
+       databases is in info_ndbm.c.  A table in get_info.c controls
+       what and in which order things are searched.
+
+       * (map.c, nfs_stubs.c) better handling for hung mount points.
+       if a filehandle is passed in by the kernel which references
+       a hung node, then try to find a replacement, possibly by calling
+       lookup explicitly.
+
+       * (*.c) use new xlog(level)(message) interface
+
+Thu Jun  8 20:28:55 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * (nfs_ops.c, ufs_ops.c) when compiled with DEBUG, display
+       the fs options being used.
+
+       * (am.c) make test for root a little more polite.
+
+       * (get_args.c) update Usage message to include -r option.
+
+Wed Jun  7 16:28:51 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * (rpc_fwd.c) fwd_reply: if the recvfrom call fails because it
+       is interrupted then try again.
+
+Tue Jun  6 16:39:15 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * Created "beta12".
+
+       * (afs_ops.c) inheriting mount option list from command line
+       is now cumulative.  A -foo on the command line is prepended
+       to the default option list taken from the map.  This can be
+       used to override the ``default default'' options in opts.c.
+
+       * (get_args.c, am.c) added new -r (restart) option.  Restart of
+       mounted filesystems is only done if this option is specified.
+       Should *not* be specified in /etc/rc.local of course.
+
+       * (yp_master.c) make the enumeration error message more verbose
+       when debugging is enabled.
+
+       * (rpc_fwd.c) rearranged some declarations at the top.  Removed
+       a spurious call to free which was causing grief on some systems,
+       but not on Sun's.  [This problem was the reason for implementing
+       the -D mem option.]
+
+       * (opts.c) make sure opt_key and opt_path are set to a zero
+       length string unless otherwise specified.  Previously they
+       were are source of dangling pointers.
+
+       * (nfs_ops.c) make sure that the allocated nfs_private identifiers
+       are unique even when some filesystem are being restarted.  This mean
+       starting the basic allocation from 1, not zero.
+
+       * (am.h, get_args.c, util.c) added definition and implmentation of
+       a simple memory allocation trace (D_MEM).
+
+       * (afs_ops.c) afs_lookuppn: tightened up memory allocation and
+       delay string copying until last possible moment.
+
+Mon Jun  5 18:01:18 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * (Makefile.com) diffs: added new rule to generate diffs
+       between versions.
+
+       * (get_info.c) search_file: added a new dlog() to note when
+       wildcards are returned.
+
+       * (afs_ops.c) afs_lookuppn: call to init_map specifies efs as
+       the default ops structure.  If the location list only contained
+       defaults and no real mounts then this previously caused a null
+       pointer dereference.
+
+       * (map.c) last_used_map: Added new variable.  Keeps track of the
+       last used map, which may be wildly different from first_free_map.
+       This fixes bugs in several routines in this file.
+
+       * (util.c) mkdirs, rmdirs: Changed directory make/unmake.  It is
+       not possible to quickly determine how many directories need to
+       be created or deleted, so we try to make as many as possible.
+
+       * (opts.c) Added default values for rfs, rhost and fs.
+       The new defaults guarentee unique names to allow the NFS
+       keepalive stuff to work.
+
+Sun Jun  4 16:12:15 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * First draft of documentation included in the next release.
+
+       * Hooks for TFS added, though this still requires a lot of work.
+
+       * Re-implemented option handling.  Options are now allocated
+       dynamically on a per-mount basis in the continuation structure.
+
+       * Changed os type u2.2 to u2_2 to allow for regular expression
+       matching in selectors.
+
+       * Format of mount maps is now entirely different.  Instead of
+       guessing which filesystem type is being used, it is now explicitly
+       stated along with the required options.  Variable expansion is
+       done on the options and selectors are also implemented.  The
+       requested name can also contain any of the selectors.
+
+Wed May 24 15:21:39 1989  Jan-Simon Pendry  (jsp at achilles)
+
+       * Re-implemented NFS ping algorithm to use the new RPC forwarding
+       system.  This allowed a large amount of nfs_ops specific code
+       to be removed from nfs_start.c and moved to nfs_ops.c.
+       There is still no strategy for hung file systems.  At the moment
+       it will merely try to mount an alternative (or the same again)
+       to the same place in the file system.
+
+       * Added RPC forwarding package.  This supports general RPC gatewaying
+       over a UDP transport.  The idea is to put a packet identifier into
+       each outgoing RPC packet and then match that up in a database when
+       a reply comes in.  The database records the original packet identifier
+       (so that it can be replaced), the source address for the packet and
+       a function to call to do the forwarding.
+
+       * ChangeLog added between beta8 and beta9.  Should have done this sooner.
diff --git a/usr/src/usr.sbin/amd/amd/patchlevel.h b/usr/src/usr.sbin/amd/amd/patchlevel.h
new file mode 100644 (file)
index 0000000..fb8ed65
--- /dev/null
@@ -0,0 +1 @@
+#define PATCHLEVEL 6
diff --git a/usr/src/usr.sbin/amd/text/COPYRIGHT b/usr/src/usr.sbin/amd/text/COPYRIGHT
new file mode 100644 (file)
index 0000000..213111b
--- /dev/null
@@ -0,0 +1,3 @@
+Copyright (c) 1990 Jan-Simon Pendry
+Copyright (c) 1990 Imperial College of Science, Technology & Medicine
+Copyright (c) 1990 The Regents of the University of California.
diff --git a/usr/src/usr.sbin/amd/text/INSTALL b/usr/src/usr.sbin/amd/text/INSTALL
new file mode 100644 (file)
index 0000000..96f8d5a
--- /dev/null
@@ -0,0 +1,174 @@
+Installation Notes for Amd.
+
+NOTE: Please read all of this before starting.
+      It is not very long and may save you time in the long term.
+
+1.  ``Getting started...''
+
+If you got this release in a shar file then run the shell script Configure in
+the top directory.  If you got this release in a tar file then you are all
+set (though if you feel left out you can run Configure anyway).
+
+2.  ``Find out what version of UN*X you are running...''
+
+To install Amd you need a port for your version of UN*X.  In this directory
+are several files called os-*.h.  One of these should correspond to your
+version of UN*X.  Look at the comments at the top of each file to determine
+which one applies to you.  If none of them do, then either no-one has yet
+done a port, or your version of UN*X is so braindead that a port is not
+possible (e.g. System V without reliable signals).  Run the program
+"config/os-type" in the current directory to see whether you and Amd are in
+agreement about your operating system type.  The current known operating
+systems (grouped by architecture) are:
+
+       acis43                  (AOS) ACIS 4.3BSD on an IBM RT
+       aix3                    AIX 3.1
+       aux                     Apple A/UX
+       bsd44                   4.4 BSD on whatever
+       concentrix              Concentrix on an Alliant
+       fpx4                    Celerity FPX 4.1/2
+       hlh42                   4.2 BSD on HLH Orion 1/05
+       hpux                    HP-UX 6.* and 7.* on a HP9000/300
+       riscix                  4.3 BSD on an Acorn Archimedes
+       sos3, sos4              SunOS 3.* and 4.* on a Sun-3 and Sun-4
+       u2_2                    Ultrix 2.2 (or 2.*?) on a VAX (broken)
+       u3_0                    Ultrix 3.0/4.0 (or 3.*?) on a VAX
+       umax43                  4.3 BSD on an Encore Multimax
+       utx32                   UTX/32 Rel2.1a on a Gould (not yet complete)
+       xinu43                  More/BSD (4.3 BSD) on a VAX or HP9000/300
+
+       + some others...
+
+If you do define a new operating system type foo, you may care to create a
+file called Makefile.foo which defines the special Makefile parameters.
+
+3.  ``Hacking the Makefile...''
+
+Some UN*X programs come with a Makefile which has to be manually configured
+for your particular operating system and hardware.  However, Amd tries very
+hard to determine what type of machine you are using and how best to compile
+itself.  If this does not work then you will have to find some heuristic
+which can differentiate your configuration.  You may need to edit
+"config/arch" and "config/os-type".  If you do make sure your changes can
+cope if /etc/motd is missing and please send it to the address below.
+
+You may care to tailor some site specific preferences in "Makefile.com".  The
+variables most likely to be changes are at the top.  Any changes are best put
+in the file Makefile.local (if they are applicable to all operating systems
+at your site) or Makefile.local.foo (where foo is the OS type as determined
+in part 1).
+
+Additionally, some configuration options may be altered in
+"config/Makefile.config".  This means that you should not need to edit any
+distributed files apart from "config/Makefile.config".  As a minimum, you
+should check:
+
+* You are using the correct C compiler.  Amd, as shipped, does not use GCC.
+  Note that using GCC version 1.34 or later (e.g. 1.36) gives structure
+  passing problems with some parts of Sun's RPC library at least on Sun-4's.
+  The current workaround is to use the system CC to compile the part of the
+  automounter that gets hit by this problem.  [[This is not the same problem
+  that is fixed by -fpcc-struct-return.]]  Amd contains no "register"
+  declarations, so using old PCC based code generators is probably bad news.
+
+* The installation directory (ETC) is set up correctly.
+
+* If you are running tests then it may be worth switching on the DEBUG flag
+  which will cause a running commentary to be printed to the log file.
+
+4.  ``Build the executable...''
+
+Now you need to compile the automounter.  To do this you type:
+
+       make
+
+If you are porting to a new machine you may want to do:
+
+       make OS=foo
+
+where foo is the name of your version of UN*X as determined in part 1, until
+you have made the changes to config/os-type and/or config/arch.  When the
+compilation is complete you will end up with a program called "A.arch_foo/Amd".
+
+Try running:
+
+       A.arch_foo/amd -v
+
+and check the output.  It should look something like:
+
+  amd 5.2 of 90/06/23 23:55:04 Rel5.2 #0: Sat Jun 23 16:24:42 PDT 1990
+  Built by pendry@okeeffe.Berkeley.EDU for a tahoe running bsd44 (big-endian)
+  Map support for: root, passwd, nis, file, error.
+
+Make sure the O/S and architecture types were correctly derived during the
+build.
+
+5.  ``Installation...''
+
+If you are not just testing Amd, then you can install it by typing:
+
+       make install
+
+to install "A.arch_foo/Amd" in "/usr/local/etc/amd" (or as otherwise
+modified in part 2).
+
+6.  ``Update /etc/rpc''
+
+Amq uses Sun RPC to talk to Amd using program number 300019 which has
+been registered with Sun.  Add the following lines to /etc/rpc or your
+YP or Hesiod master:
+
+# Automount control protocol
+amd    300019  amq
+
+7.  ``Hanging your machine...''
+
+WARNING:  THIS MAY HANG YOUR MACHINE IF YOU GET IT WRONG.
+
+Running Amd with a carelessly thought out mount map can cause your Amd to
+enter a deadlock inside the kernel.  For example, attempting to automount a
+directory which is automounted can cause the automounter to issue a mount
+request causing the kernel to send an NFS request back to the same automounter,
+which is currently stuck in a system call and unable to respond - even
+kill -KILL won't get you out of this one.
+
+There is nothing you can do to fix it without rebooting your machine, so...
+
+Find a diskless workstation and play with that first before trying this on
+your main 200 user service machine (unless you hate your users).  Something
+like a diskless Sun-4 is best for development testing - you can compile on a
+Sun-4 server and run the binary on the diskless node.  They reboot very fast
+as well between tests.
+
+Now you can try running Amd.  Please read the documentation in doc/Amd.tex
+for more details.  The configuration file "a_master" provides a sample for
+you to play with.  Something like:
+
+       ./amd -c 40 -D test,nodaemon /tmp/amnt a_master &
+
+is good for testing.  Note that Amd will clean up correctly if you send it a
+SIGINT or SIGTERM.  Other signals are either ignored or will blow it away,
+leaving your machine in a potentially dangerous state - usually a reboot is
+all that is required to fix it though ;-)
+
+Remember that Amd needs to run as root in order to do mounts/unmounts though
+it does check this condition somewhere near line one of main().  It will also
+need write permission in the working directory if you have built it with
+DEBUG defined.  Watch out for NFS stepping in and mapping root to nobody.
+
+8.  ``Report what happened...''
+
+If anything interesting happened, eg it didn't work, please report it to me
+-- Jan-Simon Pendry <jsp@doc.ic.ac.uk> -- as detailed in the README file.
+
+KNOWN PROBLEMS - Contact me for more details
+
+* Amd does not work correctly on a DecStation 3100 system running Ultrix 3.1.
+  This is a bug in Ultrix.  Quite how the Ultrix mount command works is a
+  total mystery, but in any case the mount system call does not behave as
+  documented.  Possibly fixed in Ultrix 4.0?
+
+* It is reported that amd deadlocks the kernel on a Sequent Symmetry.
+  Obviously this is a kernel bug.
+
+$Id: INSTALL,v 5.2 90/06/23 22:21:31 jsp Rel $
diff --git a/usr/src/usr.sbin/amd/text/PORTS b/usr/src/usr.sbin/amd/text/PORTS
new file mode 100644 (file)
index 0000000..dc1e0d3
--- /dev/null
@@ -0,0 +1,61 @@
+# $Id: PORTS,v 5.2 90/06/23 22:21:34 jsp Rel $
+#
+# Who did what port...
+# What is the current status.
+#
+acis43         Jan-Simon Pendry <jsp@doc.ic.ac.uk>
+       Working as of 5/90.
+
+aix3           Jan-Simon Pendry <jsp@doc.ic.ac.uk>
+       Working on 9013 as of 5/90.
+
+aux            Julian Onions <jpo@cs.nott.ac.uk>
+       Working when ported - status unknown.
+
+bsd44          Jan-Simon Pendry <jsp@doc.ic.ac.uk>
+       Working on alpha as of 5/90.
+
+concentrix     Sjoerd Mullender <sjoerd@cwi.nl>
+       Working as of 5/90.
+
+convex         Eitan Mizrotsky <eitan@shumuji.ac.il>
+       Working as of 5/90.
+
+fpx4           Stephen Pope <scp@grizzly.acl.lanl.gov>
+       Working as of 5/90.
+
+hlh42          Jan-Simon Pendry <jsp@doc.ic.ac.uk>
+       Working as of 5/90.
+
+hpux           Jan-Simon Pendry <jsp@doc.ic.ac.uk>
+       Working on 6.5 and 7.0 as of 5/90.
+
+NeXT           Tim Reed <cmcl2!dasys1!lissie!treed@rutgers.edu>
+       Working as of 5/90, waiting for diffs.
+
+pyrOSx         Stefan Petri <petri@tubsibr.UUCP>
+       Not tested as of 6/90.
+
+riscix         Piete Brooks <pb@cam.cl.ac.uk>
+       Working as of 5/90.
+
+sos3           Jan-Simon Pendry <jsp@doc.ic.ac.uk>
+       Working as of 5/90.
+
+sos4           Jan-Simon Pendry <jsp@doc.ic.ac.uk>
+       Working on 4.0.* as of 5/90.  Status of 4.1 unknown.
+
+u2_2           Piete Brooks <pb@cam.cl.ac.uk>
+       Broken - bug in Ultrix.
+
+u3_0           Piete Brooks <pb@cam.cl.ac.uk>
+       Broken - bug in Ultrix.  Thought to work with 4.0.
+
+umax43         Sjoerd Mullender <sjoerd@cwi.nl>
+       Working as of 5/90.
+
+utx32          Jan-Simon Pendry <jsp@doc.ic.ac.uk>
+       Broken - problems with UTX.
+
+xinu43         Jan-Simon Pendry <jsp@doc.ic.ac.uk>
+       Working as of 5/90.
diff --git a/usr/src/usr.sbin/amd/text/README b/usr/src/usr.sbin/amd/text/README
new file mode 100644 (file)
index 0000000..8107abb
--- /dev/null
@@ -0,0 +1,29 @@
+This program is an automounter.
+
+This automounter is a value-added, replacement for the SunOS 4
+automount(8) program.  Though based on that program in spirit, it
+contains no proprietary UN*X source code.
+
+The version you have here is release 5.2.
+
+This program is NOT in the Public Domain - it is covered by
+the usual Berkeley software distribution license - but feel free
+to take it and change it.
+
+It is believed to work correctly on Sun-3's (SunOS 3.5, 4.0, 4.1),
+Sun-4's (SunOS 4.0, 4.1), HP-9000/300 (HP-UX, MORE/bsd & BSD 4.3++),
+IBM RTs (AOS 4.3), IBM RISC System/6000 (AIX 3.1), VAXen (Ultrix 4.0,
+MORE/bsd & BSD 4.3++) and a variety of other systems.  If
+your machine is not supported please feel free to try a port, but be
+sure to send me a record of the changes you had to make.
+
+See the file INSTALL for installation instructions.
+
+Please forward *all* bug reports to Jan-Simon Pendry <jsp@doc.ic.ac.uk>
+quoting the details of the release and your configuration, which can be
+obtained by running the command "amd -v".  Thanks.
+
+The manual page (amd/amd.8) only lists the command line options.  See the
+LaTeX document doc/amd.tex for a more detailed discussion.
+
+$Id: README,v 5.2 90/06/23 22:21:33 jsp Rel $