rsalz@uunet.uu.net (Rich Salz) (04/11/90)
Submitted-by: Jan-Simon Pendry <jsp@doc.ic.ac.uk> Posting-number: Volume 21, Issue 89 Archive-name: amd/part01 AMD is a daemon that automatically mounts filesystems whenever a file or directory within that filesystem is accessed. Filesystems are automatically unmounted when they appear to have become quiescent. AMD has been designed as a value-added replacement for the SunOS 4 automount(8) program. Though based on that program in spirit, it contains no Copyright UN*X source code. This program is NOT in the Public Domain. Considerable design effort has been expended in making AMD robust in the face of NFS servers going down. AMD operates by attaching itself as an NFS server to each of the specified directories. The version you have here is release 5.1c. It is believed to work correctly on Sun-3's (SunOS 3.5 and 4.0), Sun-4's (SunOS 4.0), HP-9000/300 (HP-UX 6.x & MORE/bsd), IBM RT PCs (AOS 4.3), VAXen (Ultrix 2.2, 3.0 & MORE/bsd), Mac-II (A/UX), Acorn Archimedes (RISC iX), Encore Multimax (Umax 4.3) and Alliant FX/4 (Concentrix 5.0.0). It may work on other UN*X variants -- 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. #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh <file", e.g.. If this archive is complete, you # will see the following message at the end: # "End of archive 1 (of 13)." # Contents: COPYRIGHT Configure MANIFEST Makefile.bsd44 Makefile.hpux # PACKNOTES README RELEASE WishList amd.start.ex arch doc # doc/amd.bbl examples examples/am.master examples/amd.home # examples/amd.vol info_ndbm.c mount.h newvers.sh os-acis43.h # os-concentrix.h os-hlh42.h os-riscix.h os-sos3.h os-sos4.h # os-umax43.h os-utx32.h patchlevel.h rcs_info.c scripts # scripts/auto-banner scripts/build-userinfo scripts/get-homes # u2_2-nfs.h # Wrapped by rsalz@papaya.bbn.com on Tue Apr 10 15:11:57 1990 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'COPYRIGHT' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'COPYRIGHT'\" else echo shar: Extracting \"'COPYRIGHT'\" \(170 characters\) sed "s/^X//" >'COPYRIGHT' <<'END_OF_FILE' XCopyright (c) 1990 Jan-Simon Pendry XCopyright (c) 1990 Imperial College of Science, Technology & Medicine XCopyright (c) 1990 The Regents of the University of California. END_OF_FILE if test 170 -ne `wc -c <'COPYRIGHT'`; then echo shar: \"'COPYRIGHT'\" unpacked with wrong size! fi # end of 'COPYRIGHT' fi if test -f 'Configure' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Configure'\" else echo shar: Extracting \"'Configure'\" \(1713 characters\) sed "s/^X//" >'Configure' <<'END_OF_FILE' X#!/bin/sh - X# X# Copyright (c) 1989 Jan-Simon Pendry X# Copyright (c) 1989 Imperial College of Science, Technology & Medicine X# Copyright (c) 1989 The Regents of the University of California. X# All rights reserved. X# X# This code is derived from software contributed to Berkeley by X# Jan-Simon Pendry at Imperial College, London. X# X# Redistribution and use in source and binary forms are permitted X# provided that the above copyright notice and this paragraph are X# duplicated in all such forms and that any documentation, X# advertising materials, and other materials related to such X# distribution and use acknowledge that the software was developed X# by Imperial College of Science, Technology and Medicine, London, UK. X# The names of the College and University may not be used to endorse X# or promote products derived from this software without specific X# prior written permission. X# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR X# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED X# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. X# X# %W% (Berkeley) %G% X# Xecho "Making ./arch and ./os-type executable ..." Xuntil chmod +x ./arch ./os-type; do echo "Error: chmod command failed" >&2; exit 1; done Xecho "Checking ./arch and ./os-type ..." Xecho "" Xarch="`sh ./arch 2>/dev/null`" Xos="`sh ./os-type 2>/dev/null`" Xcase "$arch" in X"") echo "./arch doesn't produce an answer - please check it" >&2; exit 1;; Xesac Xcase "$os" in X"") echo "./os-type doesn't produce an answer - please check it" >&2; exit 1;; Xesac Xcat << % XThis machine appears to be a "$arch" running "$os". XIf that is correct just run make. XIf those are incorrect please edit ./arch and ./os-type X% Xexit 0 END_OF_FILE if test 1713 -ne `wc -c <'Configure'`; then echo shar: \"'Configure'\" unpacked with wrong size! fi chmod +x 'Configure' # end of 'Configure' fi if test -f 'MANIFEST' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'MANIFEST'\" else echo shar: Extracting \"'MANIFEST'\" \(3428 characters\) sed "s/^X//" >'MANIFEST' <<'END_OF_FILE' X File Name Archive # Description X----------------------------------------------------------- X COPYRIGHT 1 X ChangeLog 10 X Configure 1 X INSTALL 6 X MANIFEST 1 X Makefile 2 X Makefile.bsd44 1 X Makefile.com 7 X Makefile.config 2 X Makefile.hpux 1 X PACKNOTES 1 Warnings about long lines, etc X README 1 X RELEASE 1 X WishList 1 X a_master 2 X afs_ops.c 12 X am.c 5 X am.h 9 X am_ops.c 3 X amd-man 5 X amd.start.ex 1 X amq-man 2 X amq.c 7 X amq.h 3 X amq.x 4 X amq_clnt.c 3 X amq_subr.c 5 X amq_svc.c 2 X amq_xdr.c 4 X arch 1 X clock.c 4 X doc 1 X doc/amd.bbl 1 X doc/amd.bib 4 X doc/amd.tex.1 13 (part 1) X doc/amd.tex.2 11 (part 2) X doc/nh.doc 4 X doc/nh.sty 3 X efs_ops.c 2 X examples 1 X examples/am.master 1 X examples/amd.home 1 X examples/amd.homes 8 X examples/amd.vol 1 X fs.h 2 X get_args.c 7 X hpux.h 2 X ifs_ops.c 3 X info_file.c 4 X info_hes.c 2 X info_ndbm.c 1 X info_yp.c 2 X map.c 10 X mapc.c 7 X misc_rpc.c 6 X mk-amd-map.c 5 X mntfs.c 5 X mount.h 1 X mount.x 3 X mount_fs.c 4 X mount_xdr.c 3 X mtab.c 8 X newvers.sh 1 X nfs_ops.c 9 X nfs_prot.h 5 X nfs_prot.x 5 X nfs_prot_svc.c 4 X nfs_prot_xdr.c 6 X nfs_start.c 6 X nfs_stubs.c 6 X opts.c 8 X os-acis43.h 1 X os-aux.h 2 X os-bsd44.h 3 X os-concentrix.h 1 X os-defaults.h 2 X os-hlh42.h 1 X os-hpux.h 2 X os-riscix.h 1 X os-sos3.h 1 X os-sos4.h 1 X os-type 2 X os-u2_2.h 3 X os-u3_0.h 3 X os-umax43.h 1 X os-utx32.h 1 X os-xinu43.h 2 X patchlevel.h 1 X pfs_ops.c 3 X rcs_info.c 1 X restart.c 4 X rpc_fwd.c 6 X sched.c 4 X scripts 1 X scripts/auto-banner 1 X scripts/build-userinfo 1 X scripts/get-homes 1 X scripts/mk-home-maps 3 X sfs_ops.c 2 X srvr_afs.c 3 X srvr_nfs.c 8 X u2_2-nfs.h 1 X ufs_ops.c 3 X umount_fs.c 2 X util.c 9 X uwait.h 2 END_OF_FILE if test 3428 -ne `wc -c <'MANIFEST'`; then echo shar: \"'MANIFEST'\" unpacked with wrong size! fi # end of 'MANIFEST' fi if test -f 'Makefile.bsd44' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Makefile.bsd44'\" else echo shar: Extracting \"'Makefile.bsd44'\" \(1224 characters\) sed "s/^X//" >'Makefile.bsd44' <<'END_OF_FILE' X# X# $Id: Makefile.bsd44,v 5.1 89/11/17 18:22:49 jsp Exp Locker: jsp $ X# X# Copyright (c) 1989 Jan-Simon Pendry X# Copyright (c) 1989 Imperial College of Science, Technology & Medicine X# Copyright (c) 1989 The Regents of the University of California. X# All rights reserved. X# X# This code is derived from software contributed to Berkeley by X# Jan-Simon Pendry at Imperial College, London. X# X# Redistribution and use in source and binary forms are permitted X# provided that the above copyright notice and this paragraph are X# duplicated in all such forms and that any documentation, X# advertising materials, and other materials related to such X# distribution and use acknowledge that the software was developed X# by Imperial College of Science, Technology and Medicine, London, UK. X# The names of the College and University may not be used to endorse X# or promote products derived from this software without specific X# prior written permission. X# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR X# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED X# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. X# X# %W% (Berkeley) %G% X# X# Extra Makefile definitions for 4.4 BSD X# X XRPCLIB = -lrpc END_OF_FILE if test 1224 -ne `wc -c <'Makefile.bsd44'`; then echo shar: \"'Makefile.bsd44'\" unpacked with wrong size! fi # end of 'Makefile.bsd44' fi if test -f 'Makefile.hpux' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Makefile.hpux'\" else echo shar: Extracting \"'Makefile.hpux'\" \(1270 characters\) sed "s/^X//" >'Makefile.hpux' <<'END_OF_FILE' X# X# $Id: Makefile.hpux,v 5.1 89/11/17 18:23:01 jsp Exp Locker: jsp $ X# X# Copyright (c) 1989 Jan-Simon Pendry X# Copyright (c) 1989 Imperial College of Science, Technology & Medicine X# Copyright (c) 1989 The Regents of the University of California. X# All rights reserved. X# X# This code is derived from software contributed to Berkeley by X# Jan-Simon Pendry at Imperial College, London. X# X# Redistribution and use in source and binary forms are permitted X# provided that the above copyright notice and this paragraph are X# duplicated in all such forms and that any documentation, X# advertising materials, and other materials related to such X# distribution and use acknowledge that the software was developed X# by Imperial College of Science, Technology and Medicine, London, UK. X# The names of the College and University may not be used to endorse X# or promote products derived from this software without specific X# prior written permission. X# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR X# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED X# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. X# X# %W% (Berkeley) %G% X# X# Extra Makefile definitions for HP-UX X# X X#CC = gcc ${GCCOPTS} XCC = cc -Wc,-Nd2000 XOLDCC = cc -Wc,-Nd2000 END_OF_FILE if test 1270 -ne `wc -c <'Makefile.hpux'`; then echo shar: \"'Makefile.hpux'\" unpacked with wrong size! fi # end of 'Makefile.hpux' fi if test -f 'PACKNOTES' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'PACKNOTES'\" else echo shar: Extracting \"'PACKNOTES'\" \(99 characters\) sed "s/^X//" >'PACKNOTES' <<'END_OF_FILE' XFile "doc/amd.tex" was split because of its size; to create it, do X cat doc/amd.tex.? >doc/amd.tex END_OF_FILE if test 99 -ne `wc -c <'PACKNOTES'`; then echo shar: \"'PACKNOTES'\" unpacked with wrong size! fi # end of 'PACKNOTES' fi if test -f 'README' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'README'\" else echo shar: Extracting \"'README'\" \(1238 characters\) sed "s/^X//" >'README' <<'END_OF_FILE' XThe program in this directory implements an automounter. X XThis automounter is a value-added, replacement for the SunOS 4 Xautomount(8) program. Though based on that program in spirit, it Xcontains no Copyright UN*X source code. X XThis program is NOT in the Public Domain. X XThe version you have here is release 5.1c. X XIt is believed to work correctly on Sun-3's (SunOS 3.5 and 4.0), XSun-4's (SunOS 4.0), HP-9000/300 (HP-UX 6.x & MORE/bsd), IBM RT PCs X(AOS 4.3), VAXen (Ultrix 2.2, 3.0 & MORE/bsd), Mac-II (A/UX), Acorn XArchimedes (RISC iX), Encore Multimax (Umax 4.3) and Alliant FX/4 X(Concentrix 5.0.0). It may work on other UN*X variants -- please feel Xfree to try a port, but be sure to send me a record of the changes you Xhad to make. X XSee the file INSTALL for installation instructions. X XPlease forward *all* bug reports to Jan-Simon Pendry <jsp@doc.ic.ac.uk> Xquoting the details of the release and your configuration, which can be Xobtained by running the command "amd -v". Thanks. X XThe manual page (amd-man) only lists the command line options. See the XLaTeX document doc/amd.tex for a more detailed discussion. X XSome tools in the scripts directory may be of interest. X X$Id: README,v 5.1.1.3 90/01/11 16:48:39 jsp Exp Locker: jsp $ END_OF_FILE if test 1238 -ne `wc -c <'README'`; then echo shar: \"'README'\" unpacked with wrong size! fi # end of 'README' fi if test -f 'RELEASE' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'RELEASE'\" else echo shar: Extracting \"'RELEASE'\" \(59 characters\) sed "s/^X//" >'RELEASE' <<'END_OF_FILE' X$Revision: 5.1.1.6 $ of $Date: 90/01/11 16:48:57 $ Rel5.1c END_OF_FILE if test 59 -ne `wc -c <'RELEASE'`; then echo shar: \"'RELEASE'\" unpacked with wrong size! fi # end of 'RELEASE' fi if test -f 'WishList' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'WishList'\" else echo shar: Extracting \"'WishList'\" \(1500 characters\) sed "s/^X//" >'WishList' <<'END_OF_FILE' XMon May 22 17:30:55 BST 1989 -- jsp X X1. NFS ping algorithm should know about alternative port numbers. X X2. Inheriting file systems should be more intelligent in the case X of a normal system fs. Should it ever try to unmount it? X X3. The exported_ap array may be a limiting factor in a large system. X It should be made more dynamic. It is really only there to X make conversion between file handles and mount nodes faster. X XSun Jun 4 21:48:32 BST 1989 -- jsp X X5. Prove there are no memory leaks in this beast. X XFri Jun 9 16:15:35 BST 1989 -- jsp X X6. Allow more global defaults to be added with +Global -Local syntax. X XTue Jul 4 12:22:31 BST 1989 -- jsp X X7. Allow aliases for built-in values, such as host name. X XFri Jul 7 16:21:39 BST 1989 -- jsp X X8. Allow mount points to be added/deleted by amq. X9. Allow default options to be changed by amq. X10. Allow the map file to be changed by amq. X XMon Jul 17 20:34:23 BST 1989 -- jsp X X11. Put the port number into /etc/mtab and let restart read it and X try to re-use the same port number. X12. Put all the option handling into amq and just interface via X an RPC protocol to amd. Makes 8-10 trivial to implement. X XThu Oct 26 17:27:51 BST 1989 -- jsp X X13. amq should display current debug & trace levels (& orig) X XMon Dec 4 14:30:33 GMT 1989 -- rein@ifi.uio.no X X14. amq should allow maps to be flushed like SIGHUP. X15. the AM_PINGER value should be a command line argument. X XThu Dec 14 14:38:42 GMT 1989 X X16. amq should display all internal state of Amd. END_OF_FILE if test 1500 -ne `wc -c <'WishList'`; then echo shar: \"'WishList'\" unpacked with wrong size! fi # end of 'WishList' fi if test -f 'amd.start.ex' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'amd.start.ex'\" else echo shar: Extracting \"'amd.start.ex'\" \(2009 characters\) sed "s/^X//" >'amd.start.ex' <<'END_OF_FILE' X#!/bin/sh - X# X# Start amd X# X# $Id: amd.start.ex,v 5.1 89/11/17 18:23:57 jsp Exp Locker: jsp $ X# X# Copyright (c) 1989 Jan-Simon Pendry X# Copyright (c) 1989 Imperial College of Science, Technology & Medicine X# Copyright (c) 1989 The Regents of the University of California. X# All rights reserved. X# X# This code is derived from software contributed to Berkeley by X# Jan-Simon Pendry at Imperial College, London. X# X# Redistribution and use in source and binary forms are permitted X# provided that the above copyright notice and this paragraph are X# duplicated in all such forms and that any documentation, X# advertising materials, and other materials related to such X# distribution and use acknowledge that the software was developed X# by Imperial College of Science, Technology and Medicine, London, UK. X# The names of the College and University may not be used to endorse X# or promote products derived from this software without specific X# prior written permission. X# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR X# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED X# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. X# X# %W% (Berkeley) %G% X# XPATH=/usr/local/etc:/bin:/usr/bin:/usr/ucb:$PATH export PATH X X# X# Either name of logfile or "syslog" X# X#LOGFILE=syslog XLOGFILE=/var/adm/am.log X X# X# Figure out whether domain name is in host name X# If the hostname is just the machine name then X# pass in the name of the local domain so that the X# hostnames in the map are domain stripped correctly. X# Xcase `hostname` in X*.*) dmn= ;; X*) dmn='-d doc.ic.ac.uk' Xesac X X# X# Zap earlier log file X# Xcase "$LOGFILE" in X*/*) X mv "$LOGFILE" "$LOGFILE"- X > "$LOGFILE" X ;; Xsyslog) X : nothing X ;; Xesac X Xcd /usr/local/etc X# X# -r restart X# -d dmn local domain X# -w wait wait between unmount attempts X# -l log logfile or "syslog" X# Xeval nice --4 ./amd -p > /etc/amd.pid -r $dmn -w 240 -l "$LOGFILE" \ X /homes amd.homes -cache=inc \ X /home amd.home -cache=inc \ X /vol amd.vol -cache=inc END_OF_FILE if test 2009 -ne `wc -c <'amd.start.ex'`; then echo shar: \"'amd.start.ex'\" unpacked with wrong size! fi # end of 'amd.start.ex' fi if test -f 'arch' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'arch'\" else echo shar: Extracting \"'arch'\" \(2329 characters\) sed "s/^X//" >'arch' <<'END_OF_FILE' X#! /bin/sh X# X# $Id: arch,v 5.1.1.2 90/01/11 17:04:47 jsp Exp Locker: jsp $ X# X# Copyright (c) 1989 Jan-Simon Pendry X# Copyright (c) 1989 Imperial College of Science, Technology & Medicine X# Copyright (c) 1989 The Regents of the University of California. X# All rights reserved. X# X# This code is derived from software contributed to Berkeley by X# Jan-Simon Pendry at Imperial College, London. X# X# Redistribution and use in source and binary forms are permitted X# provided that the above copyright notice and this paragraph are X# duplicated in all such forms and that any documentation, X# advertising materials, and other materials related to such X# distribution and use acknowledge that the software was developed X# by Imperial College of Science, Technology and Medicine, London, UK. X# The names of the College and University may not be used to endorse X# or promote products derived from this software without specific X# prior written permission. X# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR X# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED X# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. X# X# %W% (Berkeley) %G% X# X# Figure out machine architecture X# X XPATH=/bin:/usr/bin:/usr/ucb:/etc:/usr/local/bin:${PATH} export PATH X X# X# First try to find a standard command X# Xa=arch # Sun compat Xm=machine # BSD compat Xu=uname # Sys5 compat X Xif [ -f /etc/$a -o -f /bin/$a -o -f /usr/bin/$a -o -f /usr/local/bin/$a ] Xthen X exec $a Xelif [ -f /etc/$m -o -f /bin/$m -o -f /usr/bin/$m -o -f /usr/ucb/$m -o -f /usr/local/bin/$m ] Xthen X exec $m Xelif [ -f /etc/$u -o -f /bin/$u -o -f /usr/bin/$u -o -f /usr/local/bin/$u ] Xthen X ARCH="`uname`" X case "$ARCH" in X AIX*) MACH="`uname -m`" X case "$MACH" in X 10*) echo ibm032; exit 0;; X 20*) echo ibm032; exit 0;; X esac X ;; X A/UX) echo macII ; exit 0 ;; X *) ;; X esac Xfi X X# X# Take a pot-shot at your machine architecture X# Xecho " ... No ARCH= option specified; dynamically determining architecture" >&2 X Xcase "`head -1 /etc/motd`" in X*"HP-UX"*) ARCH=hp9000;; X*"Ultrix"*) ARCH=vax;; X*"RISC iX"*) ARCH=arm;; X*"Umax 4.2"*) ARCH=encore;; X*) ARCH=unknown; X if [ -d /usr/include/caif ]; then X ARCH=ibm032 X fi;; Xesac X Xecho " ... architecture appears to be \"${ARCH}\"" >&2 Xecho $ARCH X Xcase "$ARCH" in Xunknown) exit 1 Xesac X Xexit 0 END_OF_FILE if test 2329 -ne `wc -c <'arch'`; then echo shar: \"'arch'\" unpacked with wrong size! fi chmod +x 'arch' # end of 'arch' fi if test ! -d 'doc' ; then echo shar: Creating directory \"'doc'\" mkdir 'doc' fi if test -f 'doc/amd.bbl' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'doc/amd.bbl'\" else echo shar: Extracting \"'doc/amd.bbl'\" \(1927 characters\) sed "s/^X//" >'doc/amd.bbl' <<'END_OF_FILE' X\begin{thebibliography}{10} X X\bibitem{usenix:automounter} XB.~Callaghan and T.~Lyon, ``{The Automounter},'' in {\em Usenix Conference X Proceedings, {\rm San Diego, California}}, pp.~43--51, Usenix Association, X January 1989. X X\bibitem{sun:automount} X{Sun Microsystems}, ``Automount,'' in {\em SunOS Reference Manual}, ch.~8, X pp.~1583--1585, Mountain View, California: Sun Microsystems, Inc, first~ed., X May 1988. X X\bibitem{sun:nfs} X{Sun Microsystems}, ``{Network File System: Version 2 Protocol X Specification},'' in {\em Network Programming}, ch.~7, pp.~165--185, Mountain X View, California: Sun Microsystems, Inc, first~ed., May 1988. X X\bibitem{sun:rpc} X{Sun Microsystems}, ``{Remote Procedure Calls: Protocol Specification},'' in X {\em Network Programming}, ch.~6, pp.~143--163, Mountain View, California: X Sun Microsystems, Inc, first~ed., May 1988. X X\bibitem{rfc:icmp} XJ.~Postel, ``{Internet Control Message Protocol},'' RFC 792, SRI Network X Information Center, Menlo Park, California, September 1981. X X\bibitem{sun:yp} X{Sun Microsystems}, ``{The Sun YP Service},'' in {\em System \& Network X Administration}, ch.~14, pp.~349--371, Mountain View, California: Sun X Microsystems, Inc, first~ed., May 1988. X X\bibitem{mit:hesiod} XS.~P. Dyer, ``{The {\em Hesiod} Name Server},'' in {\em Usenix Conference X Proceedings, {\rm Dallas, Texas}}, pp.~183--189, Usenix Association, February X 1988. X X\bibitem{rfc:ip} XJ.~Postel, ``{Internet Protocol},'' RFC 791, SRI Network Information Center, X Menlo Park, California, September 1981. X X\bibitem{bsd:ufs} XS.~J. Leffler {\em et~al.}, {\em The Design and Implementation of the 4.3BSD X UNIX Operating System}, ch.~7, pp.~187--223. X\newblock Addison-Wesley, 1989. X X\bibitem{mit:rvd} XM.~Greenwald and J.~V. Sciver, ``{Remote Virtual Disk Protocol X Specification},'' tech. rep., Massachusetts Institute of Technology, X Cambridge, Massachusetts, 1986. X X\end{thebibliography} END_OF_FILE if test 1927 -ne `wc -c <'doc/amd.bbl'`; then echo shar: \"'doc/amd.bbl'\" unpacked with wrong size! fi # end of 'doc/amd.bbl' fi if test ! -d 'examples' ; then echo shar: Creating directory \"'examples'\" mkdir 'examples' fi if test -f 'examples/am.master' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'examples/am.master'\" else echo shar: Extracting \"'examples/am.master'\" \(48 characters\) sed "s/^X//" >'examples/am.master' <<'END_OF_FILE' X/home amd.home X/homes amd.homes X/vol amd.vol END_OF_FILE if test 48 -ne `wc -c <'examples/am.master'`; then echo shar: \"'examples/am.master'\" unpacked with wrong size! fi # end of 'examples/am.master' fi if test -f 'examples/amd.home' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'examples/amd.home'\" else echo shar: Extracting \"'examples/amd.home'\" \(1452 characters\) sed "s/^X//" >'examples/amd.home' <<'END_OF_FILE' Xachilles -opts=rw,grpid,nosuid;rhost=achilles;rfs=/home/achilles \ X host=achilles;type=ufs;dev=/dev/xd0g \ X host=!achilles;type=nfs X#charm -opts=rw,grpid,nosuid \ X# host=!achilles;type=nfs;rhost=achilles;rfs=/home/charm \ X# host=achilles;type=ufs;dev=/dev/xd0g X#brian -opts=rw,grpid,nosuid \ X# brian:/home/brian \ X# brian:/dev/dsk/1s0 X#dougal -opts=rw,grpid,nosuid \ X# dougal:/home/dougal \ X# dougal:/dev/dsk/1s0 X#eden -opts=rw,grpid,nosuid \ X# host=!eden;type=nfs;rhost=eden;rfs=/home/eden \ X# host=eden;type=ufs;dev=/dev/dsk/1s0 Xdylan type=auto;fs=. X# Xdylan/dk2 -opts=rw,grpid,nosuid;rhost=dylan;rfs=/home/dylan/dk2 \ X host=!dylan;type=nfs \ X host=dylan;type=ufs;dev=/dev/dsk/2s0 X# Xdylan/dk3 -opts=rw,grpid,nosuids;rhost=dylan;rfs=/home/dylan/dk3 \ X host=!dylan;type=nf \ X host=dylan;type=ufs;dev=/dev/dsk/3s0 X# Xdylan/dk5 -opts=rw,grpid,nosuid;rhost=dylan;rfs=/home/dylan/dk5 \ X host=!dylan;type=nfs \ X host=dylan;type=ufs;dev=/dev/dsk/5s0 X# Xganymede -opts=rw,grpid,nosuid;rhost=ganymede;rfs=/home/ganymede \ X host=!ganymede;type=nfs \ X host=ganymede;type=ufs;dev=/dev/xy1g X# Xtoytown -opts=rw,grpid,nosuid;rhost=toytown;rfs=/home/toytown \ X host=!toytown;type=nfs \ X host=toytown;type=ufs;dev=/dev/xy1g X# Xzebedee -opts=rw,grpid,nosuid;rhost=zebedee;rfs=/home/zebedee \ X host=!zebedee;type=nfs \ X host=zebedee;type=ufs;dev=/dev/dsk/1s0 X# Xgummo -opts=rw,grpid,nosuid;rhost=gummo;rfs=/home/gummo \ X host=!gummo;type=nfs END_OF_FILE if test 1452 -ne `wc -c <'examples/amd.home'`; then echo shar: \"'examples/amd.home'\" unpacked with wrong size! fi # end of 'examples/amd.home' fi if test -f 'examples/amd.vol' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'examples/amd.vol'\" else echo shar: Extracting \"'examples/amd.vol'\" \(519 characters\) sed "s/^X//" >'examples/amd.vol' <<'END_OF_FILE' Xwp -opts=rw,grpid,nosuid;rhost=achilles \ X host=achilles;type=link;fs=/usr/local/wp \ X host=!achilles;type=nfs;rfs=/usr/local/wp X# Xtex -opts=rw,grpid,nosuid;rhost=achilles \ X host=achilles;type=link;fs=/usr/local/tex \ X host=!achilles;type=nfs;rfs=/usr/local/tex X# Xsrc -opts=rw,grpid,nosuid;rhost=achilles \ X host=achilles;type=link;fs=/usr/src \ X host=!achilles;type=nfs;rfs=/usr/src X# Xopenwin -opts=rw,grpid,nosuid;rhost=achilles \ X host=achilles;type=link;fs=/tmp/X11NeWS \ X host=!achilles;type=nfs;rfs=/vol/openwin END_OF_FILE if test 519 -ne `wc -c <'examples/amd.vol'`; then echo shar: \"'examples/amd.vol'\" unpacked with wrong size! fi # end of 'examples/amd.vol' fi if test -f 'info_ndbm.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'info_ndbm.c'\" else echo shar: Extracting \"'info_ndbm.c'\" \(2116 characters\) sed "s/^X//" >'info_ndbm.c' <<'END_OF_FILE' X/* X * $Id: info_ndbm.c,v 5.1.1.1 89/11/28 17:47:20 jsp Exp Locker: jsp $ X * X * Copyright (c) 1989 Jan-Simon Pendry X * Copyright (c) 1989 Imperial College of Science, Technology & Medicine X * Copyright (c) 1989 The Regents of the University of California. X * All rights reserved. X * X * This code is derived from software contributed to Berkeley by X * Jan-Simon Pendry at Imperial College, London. X * X * Redistribution and use in source and binary forms are permitted X * provided that the above copyright notice and this paragraph are X * duplicated in all such forms and that any documentation, X * advertising materials, and other materials related to such X * distribution and use acknowledge that the software was developed X * by Imperial College of Science, Technology and Medicine, London, UK. X * The names of the College and University may not be used to endorse X * or promote products derived from this software without specific X * prior written permission. X * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR X * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED X * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. X * X * %W% (Berkeley) %G% X */ X X/* X * Get info from NDBM map X */ X X#include "am.h" X X#ifdef HAS_NDBM_MAPS X X#include <ndbm.h> X#include <fcntl.h> X#include <sys/stat.h> X Xstatic int search_ndbm(db, key, val) XDBM *db; Xchar *key; Xchar **val; X{ X datum k, v; X k.dptr = key; X k.dsize = strlen(key) + 1; X v = dbm_fetch(db, k); X if (v.dptr) { X *val = strdup(v.dptr); X return 0; X } X return ENOENT; X} X Xint ndbm_search(m, map, key, pval, tp) Xmnt_map *m; Xchar *map; Xchar *key; Xchar **pval; Xtime_t *tp; X{ X DBM *db; X X db = dbm_open(map, O_RDONLY, 0); X if (db) { X struct stat stb; X int error; X error = fstat(dbm_pagfno(db), &stb); X if (!error && *tp < stb.st_mtime) { X *tp = stb.st_mtime; X error = -1; X } else { X error = search_ndbm(db, key, pval); X } X (void) dbm_close(db); X return error; X } X X return errno; X} X Xint ndbm_init(map) Xchar *map; X{ X DBM *db; X X db = dbm_open(map, O_RDONLY, 0); X if (db) { X dbm_close(db); X return 0; X } X X return errno; X} X X#endif END_OF_FILE if test 2116 -ne `wc -c <'info_ndbm.c'`; then echo shar: \"'info_ndbm.c'\" unpacked with wrong size! fi # end of 'info_ndbm.c' fi if test -f 'mount.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'mount.h'\" else echo shar: Extracting \"'mount.h'\" \(1457 characters\) sed "s/^X//" >'mount.h' <<'END_OF_FILE' X#define MNTPATHLEN 1024 X#define MNTNAMLEN 255 X#define FHSIZE 32 X Xtypedef char fhandle[FHSIZE]; Xbool_t xdr_fhandle(); X X Xstruct fhstatus { X u_int fhs_status; X union { X fhandle fhs_fhandle; X } fhstatus_u; X}; Xtypedef struct fhstatus fhstatus; Xbool_t xdr_fhstatus(); X X Xtypedef char *dirpath; Xbool_t xdr_dirpath(); X X Xtypedef char *name; Xbool_t xdr_name(); X X Xstruct mountlist { X name ml_hostname; X dirpath ml_directory; X struct mountlist *ml_next; X}; Xtypedef struct mountlist mountlist; Xbool_t xdr_mountlist(); X X Xtypedef struct groupnode *groups; Xbool_t xdr_groups(); X X Xstruct groupnode { X name gr_name; X groups gr_next; X}; Xtypedef struct groupnode groupnode; Xbool_t xdr_groupnode(); X X Xtypedef struct exportnode *exports; Xbool_t xdr_exports(); X X Xstruct exportnode { X dirpath ex_dir; X groups ex_groups; X exports ex_next; X}; Xtypedef struct exportnode exportnode; Xbool_t xdr_exportnode(); X X X#define MOUNTPROG ((u_long)100005) X#define MOUNTVERS ((u_long)1) X#define MOUNTPROC_NULL ((u_long)0) Xextern voidp mountproc_null_1(); X#define MOUNTPROC_MNT ((u_long)1) Xextern fhstatus *mountproc_mnt_1(); X#define MOUNTPROC_DUMP ((u_long)2) Xextern mountlist *mountproc_dump_1(); X#define MOUNTPROC_UMNT ((u_long)3) Xextern voidp mountproc_umnt_1(); X#define MOUNTPROC_UMNTALL ((u_long)4) Xextern voidp mountproc_umntall_1(); X#define MOUNTPROC_EXPORT ((u_long)5) Xextern exports *mountproc_export_1(); X#define MOUNTPROC_EXPORTALL ((u_long)6) Xextern exports *mountproc_exportall_1(); X END_OF_FILE if test 1457 -ne `wc -c <'mount.h'`; then echo shar: \"'mount.h'\" unpacked with wrong size! fi # end of 'mount.h' fi if test -f 'newvers.sh' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'newvers.sh'\" else echo shar: Extracting \"'newvers.sh'\" \(1694 characters\) sed "s/^X//" >'newvers.sh' <<'END_OF_FILE' X#!/bin/sh - X# X# $Id: newvers.sh,v 5.1 89/11/17 18:18:27 jsp Exp Locker: jsp $ X# X# Copyright (c) 1989 Jan-Simon Pendry X# Copyright (c) 1989 Imperial College of Science, Technology & Medicine X# Copyright (c) 1989 The Regents of the University of California. X# All Rights Reserved. X# X# This code is derived from software contributed to Berkeley by X# Jan-Simon Pendry at Imperial College, London. X# X# Redistribution and use in source and binary forms are permitted X# provided that the above copyright notice and this paragraph are X# duplicated in all such forms and that any documentation, X# advertising materials, and other materials related to such X# distribution and use acknowledge that the software was developed X# by Imperial College of Science, Technology and Medicine, London, UK. X# The names of the College and University may not be used to endorse X# or promote products derived from this software without specific X# prior written permission. X# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR X# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED X# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. X# X# %W% (Berkeley) %G% X# XPATH=/usr/ucb:/bin:/usr/bin Xif [ $# -ne 1 ]; then echo "Usage: newvers program" >&2; exit 1; fi Xversion="version.$1" Xif [ ! -r $version ]; then echo 0 > $version; chmod 444 $version; fi Xv=`cat $version` Xu=${USER-${LOGNAME-root}} Xh=`hostname` X#h=`expr "$h" : '\([^.]*\)'` Xt=`date` Xr=`cat ../RELEASE` Xc=`sed 's/$/\\\\n\\\\/' ../COPYRIGHT` Xrm -f vers.$1.c Xcat > vers.$1.c << %% Xchar version[] = "\\ X${c} X$1 ${r} #${v}: ${t}\\n\\ XBuilt by ${u}@${h}"; X%% Xrm -f $version X/bin/echo `expr ${v} + 1` > $version Xchmod 444 $version END_OF_FILE if test 1694 -ne `wc -c <'newvers.sh'`; then echo shar: \"'newvers.sh'\" unpacked with wrong size! fi # end of 'newvers.sh' fi if test -f 'os-acis43.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'os-acis43.h'\" else echo shar: Extracting \"'os-acis43.h'\" \(1784 characters\) sed "s/^X//" >'os-acis43.h' <<'END_OF_FILE' X/* $Id: os-acis43.h,v 5.1.1.1 89/11/28 18:00:02 jsp Exp Locker: jsp $ */ X X/* X * IBM RT ACIS4.3 definitions for Amd (automounter) X * X * Copyright (c) 1989 Jan-Simon Pendry X * Copyright (c) 1989 Imperial College of Science, Technology & Medicine X * Copyright (c) 1989 The Regents of the University of California. X * All rights reserved. X * X * This code is derived from software contributed to Berkeley by X * Jan-Simon Pendry at Imperial College, London. X * X * Redistribution and use in source and binary forms are permitted X * provided that the above copyright notice and this paragraph are X * duplicated in all such forms and that any documentation, X * advertising materials, and other materials related to such X * distribution and use acknowledge that the software was developed X * by Imperial College of Science, Technology and Medicine, London, UK. X * The names of the College and University may not be used to endorse X * or promote products derived from this software without specific X * prior written permission. X * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR X * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED X * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. X * X * %W% (Berkeley) %G% X */ X X/* X * Does the compiler grok void * X */ X#define VOIDP X X/* X * Which version of the Sun RPC library we are using X * This is the implementation release number, not X * the protocol revision number. X */ X#define RPC_3 X X/* X * Which version of the NFS interface are we using. X * This is the implementation release number, not X * the protocol revision number. X */ X#define NFS_3 X X/* X * Does this OS have NDBM support? X */ X#define OS_HAS_NDBM X X/* X * Name of filesystem types X */ X#define MOUNT_TYPE_NFS MOUNT_NFS X#define MOUNT_TYPE_UFS MOUNT_UFS END_OF_FILE if test 1784 -ne `wc -c <'os-acis43.h'`; then echo shar: \"'os-acis43.h'\" unpacked with wrong size! fi # end of 'os-acis43.h' fi if test -f 'os-concentrix.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'os-concentrix.h'\" else echo shar: Extracting \"'os-concentrix.h'\" \(1867 characters\) sed "s/^X//" >'os-concentrix.h' <<'END_OF_FILE' X/* $Id: os-concentrix.h,v 5.1.1.1 90/01/11 17:15:39 jsp Exp Locker: jsp $ */ X X/* X * Alliant Concentrix 5.0.0 definitions for Amd (automounter) X * X * Copyright (c) 1989 Jan-Simon Pendry X * Copyright (c) 1989 Imperial College of Science, Technology & Medicine X * Copyright (c) 1989 The Regents of the University of California. X * All rights reserved. X * X * This code is derived from software contributed to Berkeley by X * Jan-Simon Pendry at Imperial College, London. X * X * Redistribution and use in source and binary forms are permitted X * provided that the above copyright notice and this paragraph are X * duplicated in all such forms and that any documentation, X * advertising materials, and other materials related to such X * distribution and use acknowledge that the software was developed X * by Imperial College of Science, Technology and Medicine, London, UK. X * The names of the College and University may not be used to endorse X * or promote products derived from this software without specific X * prior written permission. X * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR X * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED X * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. X * X * %W% (Berkeley) %G% X */ X X/* X * Does the compiler grok void * X */ X#undef VOIDP X X/* X * Which version of the Sun RPC library we are using X * This is the implementation release number, not X * the protocol revision number. X */ X#define RPC_3 X X/* X * Which version of the NFS interface are we using. X * This is the implementation release number, not X * the protocol revision number. X */ X#define NFS_3 X X/* X * Does this OS have NDBM support? X */ X#define OS_HAS_NDBM X X/* X * Byte ordering X */ X#undef ARCH_ENDIAN X#define ARCH_ENDIAN "big" X X/* X * Name of filesystem types X */ X#define MOUNT_TYPE_NFS MOUNT_NFS X#define MOUNT_TYPE_UFS MOUNT_UFS END_OF_FILE if test 1867 -ne `wc -c <'os-concentrix.h'`; then echo shar: \"'os-concentrix.h'\" unpacked with wrong size! fi # end of 'os-concentrix.h' fi if test -f 'os-hlh42.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'os-hlh42.h'\" else echo shar: Extracting \"'os-hlh42.h'\" \(2004 characters\) sed "s/^X//" >'os-hlh42.h' <<'END_OF_FILE' X/* $Id: os-hlh42.h,v 5.1.1.1 89/11/28 18:03:37 jsp Exp Locker: jsp $ */ X X/* X * HLH OTS definitions for Amd (automounter) X * X * Copyright (c) 1989 Jan-Simon Pendry X * Copyright (c) 1989 Imperial College of Science, Technology & Medicine X * Copyright (c) 1989 The Regents of the University of California. X * All rights reserved. X * X * This code is derived from software contributed to Berkeley by X * Jan-Simon Pendry at Imperial College, London. X * X * Redistribution and use in source and binary forms are permitted X * provided that the above copyright notice and this paragraph are X * duplicated in all such forms and that any documentation, X * advertising materials, and other materials related to such X * distribution and use acknowledge that the software was developed X * by Imperial College of Science, Technology and Medicine, London, UK. X * The names of the College and University may not be used to endorse X * or promote products derived from this software without specific X * prior written permission. X * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR X * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED X * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. X * X * %W% (Berkeley) %G% X */ X X/* X * Does the compiler grok void * X */ X#undef VOIDP X X/* X * Which version of the Sun RPC library we are using X * This is the implementation release number, not X * the protocol revision number. X */ X#define RPC_3 X X/* X * Which version of the NFS interface are we using. X * This is the implementation release number, not X * the protocol revision number. X */ X#define NFS_3 X X/* X * Byte ordering X */ X#undef ARCH_ENDIAN X#if defined(hlh) X#define ARCH_ENDIAN "little" X#endif X X/* X * Name of filesystem types X */ X#define MOUNT_TYPE_NFS MOUNT_NFS X#define MOUNT_TYPE_UFS MOUNT_UFS X X/* X * Miscellaneous HLH 4.2 incantations X */ X#define strchr index X#define strrchr rindex X#define sigmask(x) (1 << ((x)-1)) X X/* X * HLH's 4.2 needs the extra RPC definitions. X */ X#define MISC_RPC END_OF_FILE if test 2004 -ne `wc -c <'os-hlh42.h'`; then echo shar: \"'os-hlh42.h'\" unpacked with wrong size! fi # end of 'os-hlh42.h' fi if test -f 'os-riscix.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'os-riscix.h'\" else echo shar: Extracting \"'os-riscix.h'\" \(2025 characters\) sed "s/^X//" >'os-riscix.h' <<'END_OF_FILE' X/* $Id: os-riscix.h,v 5.1.1.1 89/11/28 18:04:13 jsp Exp Locker: jsp $ */ X X/* X * Acorn Archimedes RISC iX definitions for Amd (automounter) X * Contributed by Piete Brooks. X * X * Copyright (c) 1989 Jan-Simon Pendry X * Copyright (c) 1989 Imperial College of Science, Technology & Medicine X * Copyright (c) 1989 The Regents of the University of California. X * All rights reserved. X * X * This code is derived from software contributed to Berkeley by X * Jan-Simon Pendry at Imperial College, London. X * X * Redistribution and use in source and binary forms are permitted X * provided that the above copyright notice and this paragraph are X * duplicated in all such forms and that any documentation, X * advertising materials, and other materials related to such X * distribution and use acknowledge that the software was developed X * by Imperial College of Science, Technology and Medicine, London, UK. X * The names of the College and University may not be used to endorse X * or promote products derived from this software without specific X * prior written permission. X * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR X * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED X * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. X * X * %W% (Berkeley) %G% X */ X X/* X * Does the compiler grok void * X */ X#define VOIDP X X/* X * Which version of the Sun RPC library we are using X * This is the implementation release number, not X * the protocol revision number. X */ X#define RPC_3 X X/* X * Which version of the NFS interface are we using. X * This is the implementation release number, not X * the protocol revision number. X */ X#define NFS_3 X X/* X * Does this OS have NDBM support? X */ X#define OS_HAS_NDBM X X/* X * Byte ordering X */ X#undef ARCH_ENDIAN X#define ARCH_ENDIAN "little" X X/* X * Is the mount table mirrored in software X */ X#define UPDATE_MTAB X X/* X * Name of filesystem types X */ X#define MOUNT_TYPE_NFS MOUNT_NFS X#define MOUNT_TYPE_UFS MOUNT_UFS X X#undef MTAB_TYPE_UFS X#define MTAB_TYPE_UFS MNTTYPE_43 END_OF_FILE if test 2025 -ne `wc -c <'os-riscix.h'`; then echo shar: \"'os-riscix.h'\" unpacked with wrong size! fi # end of 'os-riscix.h' fi if test -f 'os-sos3.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'os-sos3.h'\" else echo shar: Extracting \"'os-sos3.h'\" \(1904 characters\) sed "s/^X//" >'os-sos3.h' <<'END_OF_FILE' X/* $Id: os-sos3.h,v 5.1.1.1 89/11/28 18:04:23 jsp Exp Locker: jsp $ */ X X/* X * SunOS 3.2 definitions for Amd (automounter) X * X * Copyright (c) 1989 Jan-Simon Pendry X * Copyright (c) 1989 Imperial College of Science, Technology & Medicine X * Copyright (c) 1989 The Regents of the University of California. X * All rights reserved. X * X * This code is derived from software contributed to Berkeley by X * Jan-Simon Pendry at Imperial College, London. X * X * Redistribution and use in source and binary forms are permitted X * provided that the above copyright notice and this paragraph are X * duplicated in all such forms and that any documentation, X * advertising materials, and other materials related to such X * distribution and use acknowledge that the software was developed X * by Imperial College of Science, Technology and Medicine, London, UK. X * The names of the College and University may not be used to endorse X * or promote products derived from this software without specific X * prior written permission. X * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR X * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED X * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. X * X * %W% (Berkeley) %G% X */ X X/* X * Does the compiler grok void * X */ X#define VOIDP X X/* X * Which version of the Sun RPC library we are using X * This is the implementation release number, not X * the protocol revision number. X */ X#define RPC_3 X X/* X * Which version of the NFS interface are we using. X * This is the implementation release number, not X * the protocol revision number. X */ X#define NFS_3 X X/* X * Byte ordering X */ X#undef ARCH_ENDIAN X#if defined(mc68010) || defined(mc68020) || defined(sparc) X#define ARCH_ENDIAN "big" X#endif X#if defined(i386) X#define ARCH_ENDIAN "little" X#endif X X/* X * Name of filesystem types X */ X#define MOUNT_TYPE_UFS MOUNT_UFS X#define MOUNT_TYPE_NFS MOUNT_NFS END_OF_FILE if test 1904 -ne `wc -c <'os-sos3.h'`; then echo shar: \"'os-sos3.h'\" unpacked with wrong size! fi # end of 'os-sos3.h' fi if test -f 'os-sos4.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'os-sos4.h'\" else echo shar: Extracting \"'os-sos4.h'\" \(2193 characters\) sed "s/^X//" >'os-sos4.h' <<'END_OF_FILE' X/* $Id: os-sos4.h,v 5.1.1.1 89/11/28 18:04:35 jsp Exp Locker: jsp $ */ X X/* X * SunOS 4.0 definitions for Amd (automounter) X * X * Copyright (c) 1989 Jan-Simon Pendry X * Copyright (c) 1989 Imperial College of Science, Technology & Medicine X * Copyright (c) 1989 The Regents of the University of California. X * All rights reserved. X * X * This code is derived from software contributed to Berkeley by X * Jan-Simon Pendry at Imperial College, London. X * X * Redistribution and use in source and binary forms are permitted X * provided that the above copyright notice and this paragraph are X * duplicated in all such forms and that any documentation, X * advertising materials, and other materials related to such X * distribution and use acknowledge that the software was developed X * by Imperial College of Science, Technology and Medicine, London, UK. X * The names of the College and University may not be used to endorse X * or promote products derived from this software without specific X * prior written permission. X * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR X * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED X * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. X * X * %W% (Berkeley) %G% X */ X X/* X * Does the compiler grok void * X */ X#define VOIDP X X/* X * Which version of the Sun RPC library we are using X * This is the implementation release number, not X * the protocol revision number. X */ X#define RPC_4 X X/* X * Which version of the NFS interface are we using. X * This is the implementation release number, not X * the protocol revision number. X */ X#define NFS_4 X X/* X * Does this OS have NDBM support? X */ X#define OS_HAS_NDBM X X/* X * Byte ordering X */ X#undef ARCH_ENDIAN X#if defined(mc68010) || defined(mc68020) || defined(sparc) X#define ARCH_ENDIAN "big" X#endif X#if defined(i386) X#define ARCH_ENDIAN "little" X#endif X X/* X * Name of filesystem types X */ X#define MOUNT_TYPE_NFS "nfs" X#define MOUNT_TYPE_UFS "4.2" X X/* X * Type of a file handle X */ X#undef NFS_FH_TYPE X#define NFS_FH_TYPE caddr_t X X/* X * Type of filesystem type X */ X#undef MTYPE_TYPE X#define MTYPE_TYPE char * X X/* X * Add support for SunOS 4 automounter files X */ X#define SUNOS4_COMPAT END_OF_FILE if test 2193 -ne `wc -c <'os-sos4.h'`; then echo shar: \"'os-sos4.h'\" unpacked with wrong size! fi # end of 'os-sos4.h' fi if test -f 'os-umax43.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'os-umax43.h'\" else echo shar: Extracting \"'os-umax43.h'\" \(1851 characters\) sed "s/^X//" >'os-umax43.h' <<'END_OF_FILE' X/* $Id: os-umax43.h,v 5.1.1.1 90/01/11 17:16:53 jsp Exp Locker: jsp $ */ X X/* X * UMAX 4.3 definitions for Amd (automounter) X * X * Copyright (c) 1989 Jan-Simon Pendry X * Copyright (c) 1989 Imperial College of Science, Technology & Medicine X * Copyright (c) 1989 The Regents of the University of California. X * All rights reserved. X * X * This code is derived from software contributed to Berkeley by X * Jan-Simon Pendry at Imperial College, London. X * X * Redistribution and use in source and binary forms are permitted X * provided that the above copyright notice and this paragraph are X * duplicated in all such forms and that any documentation, X * advertising materials, and other materials related to such X * distribution and use acknowledge that the software was developed X * by Imperial College of Science, Technology and Medicine, London, UK. X * The names of the College and University may not be used to endorse X * or promote products derived from this software without specific X * prior written permission. X * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR X * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED X * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. X * X * %W% (Berkeley) %G% X */ X X/* X * Does the compiler grok void * X */ X#define VOIDP X X/* X * Which version of the Sun RPC library we are using X * This is the implementation release number, not X * the protocol revision number. X */ X#define RPC_4 X X/* X * Which version of the NFS interface are we using. X * This is the implementation release number, not X * the protocol revision number. X */ X#define NFS_3 X X/* X * Does this OS have NDBM support? X */ X#define OS_HAS_NDBM X X/* X * Byte ordering X */ X#undef ARCH_ENDIAN X#define ARCH_ENDIAN "little" X X/* X * Name of filesystem types X */ X#define MOUNT_TYPE_NFS MOUNT_NFS X#define MOUNT_TYPE_UFS MOUNT_UFS END_OF_FILE if test 1851 -ne `wc -c <'os-umax43.h'`; then echo shar: \"'os-umax43.h'\" unpacked with wrong size! fi # end of 'os-umax43.h' fi if test -f 'os-utx32.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'os-utx32.h'\" else echo shar: Extracting \"'os-utx32.h'\" \(1970 characters\) sed "s/^X//" >'os-utx32.h' <<'END_OF_FILE' X/* $Id: os-utx32.h,v 5.1.1.1 89/11/28 18:05:09 jsp Exp Locker: jsp $ */ X X/* X * Gould UTX/32 definitions for Amd (automounter) X * X * Copyright (c) 1989 Jan-Simon Pendry X * Copyright (c) 1989 Imperial College of Science, Technology & Medicine X * Copyright (c) 1989 The Regents of the University of California. X * All rights reserved. X * X * This code is derived from software contributed to Berkeley by X * Jan-Simon Pendry at Imperial College, London. X * X * Redistribution and use in source and binary forms are permitted X * provided that the above copyright notice and this paragraph are X * duplicated in all such forms and that any documentation, X * advertising materials, and other materials related to such X * distribution and use acknowledge that the software was developed X * by Imperial College of Science, Technology and Medicine, London, UK. X * The names of the College and University may not be used to endorse X * or promote products derived from this software without specific X * prior written permission. X * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR X * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED X * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. X * X * %W% (Berkeley) %G% X */ X X/* X * Does the compiler grok void * X */ X#ifdef __GNUC__ X#define VOIDP X#endif X X/* X * Which version of the Sun RPC library we are using X * This is the implementation release number, not X * the protocol revision number. X */ X#define RPC_3 X X/* X * Which version of the NFS interface are we using. X * This is the implementation release number, not X * the protocol revision number. X */ X#define NFS_3 X X/* X * Does this OS have NDBM support? X */ X#define OS_HAS_NDBM X X/* X * Byte ordering X */ X#undef ARCH_ENDIAN X#if defined(gould) || defined(GOULD_PN) X#define ARCH_ENDIAN "big" X#endif X X/* X * Name of filesystem types X */ X#define MOUNT_TYPE_NFS MOUNT_NFS X#define MOUNT_TYPE_UFS MOUNT_UFS X#undef MTAB_TYPE_UFS X#define MTAB_TYPE_UFS "4.3" END_OF_FILE if test 1970 -ne `wc -c <'os-utx32.h'`; then echo shar: \"'os-utx32.h'\" unpacked with wrong size! fi # end of 'os-utx32.h' fi if test -f 'patchlevel.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'patchlevel.h'\" else echo shar: Extracting \"'patchlevel.h'\" \(21 characters\) sed "s/^X//" >'patchlevel.h' <<'END_OF_FILE' X#define PATCHLEVEL 6 END_OF_FILE if test 21 -ne `wc -c <'patchlevel.h'`; then echo shar: \"'patchlevel.h'\" unpacked with wrong size! fi # end of 'patchlevel.h' fi if test -f 'rcs_info.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'rcs_info.c'\" else echo shar: Extracting \"'rcs_info.c'\" \(2243 characters\) sed "s/^X//" >'rcs_info.c' <<'END_OF_FILE' X/* X * $Id: rcs_info.c,v 5.1.1.1 90/01/11 17:17:42 jsp Exp Locker: jsp $ X * X * Copyright (c) 1990 Jan-Simon Pendry X * Copyright (c) 1990 Imperial College of Science, Technology & Medicine X * Copyright (c) 1990 The Regents of the University of California. X * All rights reserved. X * X * This code is derived from software contributed to Berkeley by X * Jan-Simon Pendry at Imperial College, London. X * X * Redistribution and use in source and binary forms are permitted X * provided that the above copyright notice and this paragraph are X * duplicated in all such forms and that any documentation, X * advertising materials, and other materials related to such X * distribution and use acknowledge that the software was developed X * by Imperial College of Science, Technology and Medicine, London, UK. X * The names of the College and University may not be used to endorse X * or promote products derived from this software without specific X * prior written permission. X * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR X * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED X * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. X * X * %W% (Berkeley) %G% X */ X X/* X * Pretty-print some RCS information X */ X X#include "am.h" X Xvoid show_rcs_info(msg, buf) Xconst char *msg; Xchar *buf; X{ X /* X * Trivial fsm to print an RCS header without X * printing the RCS variables themselves. X */ X const char *p = msg; X X enum rstate { Text, Header, Body, FQuit } st = Text; X X while (st != FQuit) { X if (st == Text || st == Body) { X /* X * Find next $ X */ X int len; X char *q = strchr(p, '$'); X if (q) { X /* X * Write out upto the '$' X */ X len = q-p-(st==Body?1:0); X bcopy(p, buf, len); X /* X * Advance p X */ X p = q+1; X /* X * Switch state X */ X if (st == Body) X st = Text; X else X st = Header; X } else { X /* X * Nothing more to do, write X * out rest of line and quit X */ X len = strlen(p); X bcopy(p, buf, len); X st = FQuit; X } X buf += len; X } else if (st == Header) { X /* X * Skip past $blah: part X */ X char *q = strchr(p, ':'); X if (q) { X p = q+2; X st = Body; X } else { X st = FQuit; X } X } X } X *buf = '\0'; X} END_OF_FILE if test 2243 -ne `wc -c <'rcs_info.c'`; then echo shar: \"'rcs_info.c'\" unpacked with wrong size! fi # end of 'rcs_info.c' fi if test ! -d 'scripts' ; then echo shar: Creating directory \"'scripts'\" mkdir 'scripts' fi if test -f 'scripts/auto-banner' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'scripts/auto-banner'\" else echo shar: Extracting \"'scripts/auto-banner'\" \(300 characters\) sed "s/^X//" >'scripts/auto-banner' <<'END_OF_FILE' X#!/bin/sh X# X# $Id: auto-banner,v 5.1 89/11/17 18:24:08 jsp Exp Locker: jsp $ X# X# Copyright (C) 1989 by Jan-Simon Pendry X# All Rights Reserved. X# X# Generate a warning banner X# Xcat << % X# X# X# WARNING: THIS IS A MACHINE GENERATED FILE --- DO NOT EDIT HERE X# X# Built by $USER@`hostname` on `date` X# X% END_OF_FILE if test 300 -ne `wc -c <'scripts/auto-banner'`; then echo shar: \"'scripts/auto-banner'\" unpacked with wrong size! fi chmod +x 'scripts/auto-banner' # end of 'scripts/auto-banner' fi if test -f 'scripts/build-userinfo' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'scripts/build-userinfo'\" else echo shar: Extracting \"'scripts/build-userinfo'\" \(929 characters\) sed "s/^X//" >'scripts/build-userinfo' <<'END_OF_FILE' X#!/bin/sh - X# X# $Id: build-userinfo,v 5.1 89/11/17 18:24:12 jsp Exp Locker: jsp $ X# X# Copyright (C) 1989 by Jan-Simon Pendry X# All Rights Reserved. X# X# Construct the amd.home and amd.homes maps for /home and /homes. X# X# First call "get-homes" which will locate a list of user home directories. X# Then call mk-home-maps which takes the list of directories and a list X# of disk partition information and constructs the amd maps. X# Xif get-homes home-dirs && mk-home-maps home-dirs home-parts; then X # X # So far so good... X # Now rename the files, appending the .copyin files X # if they exist X # X auto-banner | tee amd.homes amd.home > /dev/null X if [ -f amd.homes.copyin ]; then X cat home-dirs.cf amd.homes.copyin >> amd.homes X else X cat home-dirs.cf >> amd.homes X fi X rm home-dirs.cf X if [ -f amd.home.copyin ]; then X cat home-parts.cf amd.home.copyin >> amd.home X else X cat home-parts.cf >> amd.home X fi X rm home-parts.cf Xfi END_OF_FILE if test 929 -ne `wc -c <'scripts/build-userinfo'`; then echo shar: \"'scripts/build-userinfo'\" unpacked with wrong size! fi chmod +x 'scripts/build-userinfo' # end of 'scripts/build-userinfo' fi if test -f 'scripts/get-homes' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'scripts/get-homes'\" else echo shar: Extracting \"'scripts/get-homes'\" \(1058 characters\) sed "s/^X//" >'scripts/get-homes' <<'END_OF_FILE' X#!/bin/sh - X# X# $Id: get-homes,v 5.1 89/11/17 18:24:15 jsp Exp Locker: jsp $ X# X# Copyright (C) 1989 by Jan-Simon Pendry X# All Rights Reserved. X# X# Grab copy of the password file and get the user names X# and home directories from it. X# Of course, the entire point is to remove the specific X# details from the password file and replace it with /homes/username X# so usually you only run this once to get the initial database X# sorted out. After that just edit the database directly... X# X# Copes with machines running YP. X# Xrpcinfo=/usr/etc/rpcinfo X X# X# Check for optional first argument X# Xcase "$#" in X0) X file=/dev/stdout;; X1) X file="$1";; X*) X echo Usage: get-homes "[output-file]" 2>&1 X exit 1;; Xesac X X# X# Figure out how to get the password file X# Xif [ -x $rpcinfo ] && ($rpcinfo -p | grep -s ypbind) 2>/dev/null; then X mkdata="ypcat passwd.byname" Xelse X mkdata="cat /etc/passwd" Xfi X X# X# Possibly redirect stdout X# Xif [ "$file" != /dev/stdout ]; then X exec > "$file" Xfi X X# X# Extract the required information X# X$mkdata | awk -F: '{printf "%s\t%s\n", $1, $6}' END_OF_FILE if test 1058 -ne `wc -c <'scripts/get-homes'`; then echo shar: \"'scripts/get-homes'\" unpacked with wrong size! fi chmod +x 'scripts/get-homes' # end of 'scripts/get-homes' fi if test -f 'u2_2-nfs.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'u2_2-nfs.h'\" else echo shar: Extracting \"'u2_2-nfs.h'\" \(1400 characters\) sed "s/^X//" >'u2_2-nfs.h' <<'END_OF_FILE' X/* X * $Id: u2_2-nfs.h,v 5.1.1.1 90/01/11 17:21:35 jsp Exp Locker: jsp $ X * X * Copyright (c) 1990 Jan-Simon Pendry X * Copyright (c) 1990 Imperial College of Science, Technology & Medicine X * Copyright (c) 1990 The Regents of the University of California. X * All rights reserved. X * X * This code is derived from software contributed to Berkeley by X * Jan-Simon Pendry at Imperial College, London. X * X * Redistribution and use in source and binary forms are permitted X * provided that the above copyright notice and this paragraph are X * duplicated in all such forms and that any documentation, X * advertising materials, and other materials related to such X * distribution and use acknowledge that the software was developed X * by Imperial College of Science, Technology and Medicine, London, UK. X * The names of the College and University may not be used to endorse X * or promote products derived from this software without specific X * prior written permission. X * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR X * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED X * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. X * X * %W% (Berkeley) %G% X */ X X#include <nfs/nfs_gfs.h> X#define KERNEL X#include <sys/fs_types.h> X#undef KERNEL X X#ifndef HOSTNAMESZ X#include <nfs/nfs_clnt.h> X#endif X X#include <ufs/ufs_mount.h> X X#define ufs_args ufs_specific END_OF_FILE if test 1400 -ne `wc -c <'u2_2-nfs.h'`; then echo shar: \"'u2_2-nfs.h'\" unpacked with wrong size! fi # end of 'u2_2-nfs.h' fi echo shar: End of archive 1 \(of 13\). cp /dev/null ark1isdone MISSING="" for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have unpacked all 13 archives. rm -f ark[1-9]isdone ark[1-9][0-9]isdone else echo You still need to unpack the following archives: echo " " ${MISSING} fi ## End of shell archive. exit 0 exit 0 # Just in case... -- Please send comp.sources.unix-related mail to rsalz@uunet.uu.net. Use a domain-based address or give alternate paths, or you may lose out.