From 2f619045ac0ffaec4800d59b47087ba0cf79fc4a Mon Sep 17 00:00:00 2001 From: Jan-Simon Pendry Date: Sun, 17 Mar 1991 22:06:52 -0800 Subject: [PATCH] from amd5.3 alpha11 SCCS-vsn: usr.sbin/amd/amq/Makefile 5.3 SCCS-vsn: usr.sbin/amd/amq/amq.c 5.2 SCCS-vsn: usr.sbin/amd/amq/amq.8 5.3 SCCS-vsn: usr.sbin/amd/fsinfo/fsi_analyze.c 5.2 SCCS-vsn: usr.sbin/amd/fsinfo/fsi_data.h 5.2 SCCS-vsn: usr.sbin/amd/fsinfo/fsi_dict.c 5.2 SCCS-vsn: usr.sbin/amd/fsinfo/fsi_gram.y 5.2 SCCS-vsn: usr.sbin/amd/fsinfo/fsi_lex.l 5.2 SCCS-vsn: usr.sbin/amd/fsinfo/fsi_util.c 5.2 SCCS-vsn: usr.sbin/amd/fsinfo/fsinfo.c 5.2 SCCS-vsn: usr.sbin/amd/fsinfo/fsinfo.h 5.2 SCCS-vsn: usr.sbin/amd/fsinfo/wr_atab.c 5.2 SCCS-vsn: usr.sbin/amd/fsinfo/wr_bparam.c 5.2 SCCS-vsn: usr.sbin/amd/fsinfo/wr_dumpset.c 5.2 SCCS-vsn: usr.sbin/amd/fsinfo/wr_exportfs.c 5.2 SCCS-vsn: usr.sbin/amd/fsinfo/wr_fstab.c 5.2 SCCS-vsn: usr.sbin/amd/Makefile 5.3 SCCS-vsn: usr.sbin/amd/rpcx/amq.h 5.2 SCCS-vsn: usr.sbin/amd/rpcx/amq.x 5.2 SCCS-vsn: usr.sbin/amd/rpcx/amq_clnt.c 5.2 SCCS-vsn: usr.sbin/amd/rpcx/amq_svc.c 5.2 SCCS-vsn: usr.sbin/amd/rpcx/amq_xdr.c 5.2 SCCS-vsn: usr.sbin/amd/rpcx/mount.h 5.2 SCCS-vsn: usr.sbin/amd/rpcx/mount_xdr.c 5.2 SCCS-vsn: usr.sbin/amd/rpcx/nfs_prot.h 5.2 SCCS-vsn: usr.sbin/amd/rpcx/nfs_prot_svc.c 5.2 SCCS-vsn: usr.sbin/amd/rpcx/nfs_prot_xdr.c 5.2 SCCS-vsn: usr.sbin/amd/mk-amd-map/mk-amd-map.c 5.3 SCCS-vsn: usr.sbin/amd/mk-amd-map/Makefile 5.3 SCCS-vsn: usr.sbin/amd/config/misc-aix3.h 5.2 SCCS-vsn: usr.sbin/amd/config/misc-hpux.h 5.2 SCCS-vsn: usr.sbin/amd/config/misc-irix.h 5.2 SCCS-vsn: usr.sbin/amd/config/misc-next.h 5.2 SCCS-vsn: usr.sbin/amd/config/misc-ultrix.h 5.2 SCCS-vsn: usr.sbin/amd/config/mount_aix.c 5.2 SCCS-vsn: usr.sbin/amd/config/mount_irix.c 5.2 SCCS-vsn: usr.sbin/amd/config/mtab_aix.c 5.2 SCCS-vsn: usr.sbin/amd/config/mtab_bsd.c 5.2 SCCS-vsn: usr.sbin/amd/config/mtab_file.c 5.2 SCCS-vsn: usr.sbin/amd/config/mtab_ultrix.c 5.2 SCCS-vsn: usr.sbin/amd/config/os-acis43.h 5.2 SCCS-vsn: usr.sbin/amd/config/os-aix3.h 5.2 SCCS-vsn: usr.sbin/amd/config/os-aux.h 5.2 SCCS-vsn: usr.sbin/amd/config/os-bsd44.h 5.2 SCCS-vsn: usr.sbin/amd/config/os-concentrix.h 5.2 SCCS-vsn: usr.sbin/amd/config/os-convex.h 5.2 SCCS-vsn: usr.sbin/amd/config/os-defaults.h 5.2 SCCS-vsn: usr.sbin/amd/config/os-dgux.h 5.2 SCCS-vsn: usr.sbin/amd/config/os-fpx4.h 5.2 SCCS-vsn: usr.sbin/amd/config/os-hcx.h 5.2 SCCS-vsn: usr.sbin/amd/config/os-hlh42.h 5.2 SCCS-vsn: usr.sbin/amd/config/os-hpux.h 5.2 SCCS-vsn: usr.sbin/amd/config/os-irix.h 5.2 SCCS-vsn: usr.sbin/amd/config/os-next.h 5.2 SCCS-vsn: usr.sbin/amd/config/os-pyrOSx.h 5.2 SCCS-vsn: usr.sbin/amd/config/os-riscix.h 5.2 SCCS-vsn: usr.sbin/amd/config/os-sos3.h 5.2 SCCS-vsn: usr.sbin/amd/config/os-sos4.h 5.2 SCCS-vsn: usr.sbin/amd/config/os-u2_2.h 5.2 SCCS-vsn: usr.sbin/amd/config/os-u3_0.h 5.2 SCCS-vsn: usr.sbin/amd/config/os-u4_0.h 5.2 SCCS-vsn: usr.sbin/amd/config/os-umax43.h 5.2 SCCS-vsn: usr.sbin/amd/config/os-utek.h 5.2 SCCS-vsn: usr.sbin/amd/config/os-utx32.h 5.2 SCCS-vsn: usr.sbin/amd/config/os-xinu43.h 5.2 SCCS-vsn: usr.sbin/amd/config/arch 5.2 SCCS-vsn: usr.sbin/amd/config/os-type 5.2 SCCS-vsn: usr.sbin/amd/config/RELEASE 5.2 SCCS-vsn: usr.sbin/amd/config/Makefile.aix3 5.2 SCCS-vsn: usr.sbin/amd/config/Makefile.bsd44 5.2 SCCS-vsn: usr.sbin/amd/config/Makefile.config 5.2 SCCS-vsn: usr.sbin/amd/config/Makefile.hpux 5.2 SCCS-vsn: usr.sbin/amd/config/Makefile.irix 5.2 SCCS-vsn: usr.sbin/amd/config/Configure 5.2 SCCS-vsn: usr.sbin/amd/config/newvers.sh 5.3 SCCS-vsn: usr.sbin/amd/maps/a_master 5.2 SCCS-vsn: usr.sbin/amd/maps/a_net 5.2 SCCS-vsn: usr.sbin/amd/text/COPYRIGHT 1.2 SCCS-vsn: usr.sbin/amd/text/INSTALL 1.2 SCCS-vsn: usr.sbin/amd/text/README 1.2 SCCS-vsn: usr.sbin/amd/text/amd.start.ex 5.2 SCCS-vsn: usr.sbin/amd/doc/Makefile 5.2 --- usr/src/usr.sbin/amd/Makefile | 4 +- usr/src/usr.sbin/amd/amq/Makefile | 2 +- usr/src/usr.sbin/amd/amq/amq.8 | 32 ++- usr/src/usr.sbin/amd/amq/amq.c | 144 ++++++++-- usr/src/usr.sbin/amd/config/Configure | 2 +- usr/src/usr.sbin/amd/config/Makefile.aix3 | 4 +- usr/src/usr.sbin/amd/config/Makefile.bsd44 | 4 +- usr/src/usr.sbin/amd/config/Makefile.config | 24 +- usr/src/usr.sbin/amd/config/Makefile.hpux | 9 +- usr/src/usr.sbin/amd/config/Makefile.irix | 16 +- usr/src/usr.sbin/amd/config/arch | 31 ++- usr/src/usr.sbin/amd/config/misc-aix3.h | 4 +- usr/src/usr.sbin/amd/config/misc-hpux.h | 4 +- usr/src/usr.sbin/amd/config/misc-irix.h | 16 +- usr/src/usr.sbin/amd/config/misc-next.h | 16 +- usr/src/usr.sbin/amd/config/misc-ultrix.h | 4 +- usr/src/usr.sbin/amd/config/mount_aix.c | 16 +- usr/src/usr.sbin/amd/config/mount_irix.c | 16 +- usr/src/usr.sbin/amd/config/mtab_aix.c | 11 +- usr/src/usr.sbin/amd/config/mtab_bsd.c | 4 +- usr/src/usr.sbin/amd/config/mtab_file.c | 263 +++++++++++-------- usr/src/usr.sbin/amd/config/mtab_ultrix.c | 4 +- usr/src/usr.sbin/amd/config/newvers.sh | 45 +++- usr/src/usr.sbin/amd/config/os-acis43.h | 14 +- usr/src/usr.sbin/amd/config/os-aix3.h | 8 +- usr/src/usr.sbin/amd/config/os-aux.h | 9 +- usr/src/usr.sbin/amd/config/os-bsd44.h | 18 +- usr/src/usr.sbin/amd/config/os-concentrix.h | 4 +- usr/src/usr.sbin/amd/config/os-convex.h | 4 +- usr/src/usr.sbin/amd/config/os-defaults.h | 19 +- usr/src/usr.sbin/amd/config/os-dgux.h | 16 +- usr/src/usr.sbin/amd/config/os-fpx4.h | 4 +- usr/src/usr.sbin/amd/config/os-hcx.h | 16 +- usr/src/usr.sbin/amd/config/os-hlh42.h | 7 +- usr/src/usr.sbin/amd/config/os-hpux.h | 36 ++- usr/src/usr.sbin/amd/config/os-irix.h | 16 +- usr/src/usr.sbin/amd/config/os-next.h | 16 +- usr/src/usr.sbin/amd/config/os-pyrOSx.h | 5 +- usr/src/usr.sbin/amd/config/os-riscix.h | 4 +- usr/src/usr.sbin/amd/config/os-sos3.h | 4 +- usr/src/usr.sbin/amd/config/os-sos4.h | 13 +- usr/src/usr.sbin/amd/config/os-type | 34 ++- usr/src/usr.sbin/amd/config/os-u2_2.h | 7 +- usr/src/usr.sbin/amd/config/os-u3_0.h | 7 +- usr/src/usr.sbin/amd/config/os-u4_0.h | 16 +- usr/src/usr.sbin/amd/config/os-umax43.h | 4 +- usr/src/usr.sbin/amd/config/os-utek.h | 16 +- usr/src/usr.sbin/amd/config/os-utx32.h | 4 +- usr/src/usr.sbin/amd/config/os-xinu43.h | 6 +- usr/src/usr.sbin/amd/doc/Makefile | 16 +- usr/src/usr.sbin/amd/fsinfo/fsi_analyze.c | 16 +- usr/src/usr.sbin/amd/fsinfo/fsi_data.h | 16 +- usr/src/usr.sbin/amd/fsinfo/fsi_dict.c | 16 +- usr/src/usr.sbin/amd/fsinfo/fsi_gram.y | 16 +- usr/src/usr.sbin/amd/fsinfo/fsi_lex.l | 16 +- usr/src/usr.sbin/amd/fsinfo/fsi_util.c | 16 +- usr/src/usr.sbin/amd/fsinfo/fsinfo.c | 16 +- usr/src/usr.sbin/amd/fsinfo/fsinfo.h | 16 +- usr/src/usr.sbin/amd/fsinfo/wr_atab.c | 16 +- usr/src/usr.sbin/amd/fsinfo/wr_bparam.c | 16 +- usr/src/usr.sbin/amd/fsinfo/wr_dumpset.c | 16 +- usr/src/usr.sbin/amd/fsinfo/wr_exportfs.c | 16 +- usr/src/usr.sbin/amd/fsinfo/wr_fstab.c | 16 +- usr/src/usr.sbin/amd/mk-amd-map/Makefile | 2 +- usr/src/usr.sbin/amd/mk-amd-map/mk-amd-map.c | 160 ++++++----- usr/src/usr.sbin/amd/rpcx/amq.h | 8 +- usr/src/usr.sbin/amd/rpcx/amq.x | 16 +- usr/src/usr.sbin/amd/rpcx/amq_clnt.c | 37 ++- usr/src/usr.sbin/amd/rpcx/amq_svc.c | 17 +- usr/src/usr.sbin/amd/rpcx/amq_xdr.c | 4 +- usr/src/usr.sbin/amd/rpcx/mount.h | 14 - usr/src/usr.sbin/amd/rpcx/mount_xdr.c | 4 +- usr/src/usr.sbin/amd/rpcx/nfs_prot.h | 16 +- usr/src/usr.sbin/amd/rpcx/nfs_prot_svc.c | 4 +- usr/src/usr.sbin/amd/rpcx/nfs_prot_xdr.c | 4 +- usr/src/usr.sbin/amd/text/INSTALL | 124 +++++---- usr/src/usr.sbin/amd/text/README | 22 +- usr/src/usr.sbin/amd/text/amd.start.ex | 4 +- 78 files changed, 854 insertions(+), 788 deletions(-) diff --git a/usr/src/usr.sbin/amd/Makefile b/usr/src/usr.sbin/amd/Makefile index 3dc50ba0bb..762937d324 100644 --- a/usr/src/usr.sbin/amd/Makefile +++ b/usr/src/usr.sbin/amd/Makefile @@ -1,5 +1,5 @@ -# @(#)Makefile 5.2 (Berkeley) %G% +# @(#)Makefile 5.3 (Berkeley) %G% -SUBDIR= amd amq mk-amd-map +SUBDIR= amd amq fsinfo mk-amd-map .include diff --git a/usr/src/usr.sbin/amd/amq/Makefile b/usr/src/usr.sbin/amd/amq/Makefile index 8b322ad345..54027a936a 100644 --- a/usr/src/usr.sbin/amd/amq/Makefile +++ b/usr/src/usr.sbin/amd/amq/Makefile @@ -1,4 +1,4 @@ -# @(#)Makefile 5.2 (Makefile) %G% +# @(#)Makefile 5.3 (Berkeley) %G% PROG = amq SRCS = amq.c amq_clnt.c amq_xdr.c misc_rpc.c diff --git a/usr/src/usr.sbin/amd/amq/amq.8 b/usr/src/usr.sbin/amd/amq/amq.8 index 842ebb8938..5499c94326 100644 --- a/usr/src/usr.sbin/amd/amq/amq.8 +++ b/usr/src/usr.sbin/amd/amq/amq.8 @@ -5,11 +5,12 @@ .\" .\" This code is derived from software contributed to Berkeley by .\" Jan-Simon Pendry at Imperial College, London. -.\" %sccs.include.redist.man% .\" -.\" @(#)amq.8 5.2 (Berkeley) %G% +.\" %sccs include.redist.man% .\" -.Dd +.\" @(#)amq.8 5.3 (Berkeley) %G% +.\" +.Dd March 17, 1991 .Dt AMQ 8 .Os .Sh NAME @@ -19,14 +20,16 @@ .Nm amq .Op Fl f .Op Fl h Ar hostname +.Op Fl M Ar mountmap_entry .Op Fl m .Op Fl s .Op Fl u +.Op Fl v .Op Ar directory .Ar ... .Sh DESCRIPTION .Nm Amq -provides a simple way of determining the current state of +provides a simple way of determining the current state of the .Xr amd 8 program. Communication is by @@ -43,8 +46,7 @@ then per-filesystem information is displayed. .Sh OPTIONS .Bl -tag -width Ds .It Fl f -Request automounter to flush the internal -mount map cache. +Request automounter to flush the internal caches. .It Fl h Ar hostname Query alternate host .Ar hostname . @@ -53,18 +55,27 @@ By default the local host is used. In an cluster, the root server is queried by default, since that is the system on which the automounter is normally run. .It Fl m -Request automounter to provide a list of mounted filesystems, +Request the automounter to provide a list of mounted filesystems, including the number of references to each filesystem and any error which occured while mounting. .It Fl s -Request automounter to provide system-wide mount statistics. +Request the automounter to provide system-wide mount statistics. .It Fl u -Request automounter to unmount the named filesystems +Request the automounter to unmount the named filesystems instead of providing information about them. Unmounts are requested, not forced. They merely cause the mounted filesystem to timeout, which will be picked up by .Xr amd Ns \'s main scheduler thus causing the normal timeout action to be taken. +.It Fl v +Request the automounter to provide version information. This is a subset +of the information provided by +.Xr amd Ns \'s +.It Fl v +option. +.It Fl M +Request automounter to add the given map entry to the root map and then +trigger a mount request for it. .El .Sh FILES .Bl -tag -width amq.xxxxx -compact @@ -87,6 +98,5 @@ database. .An Jan-Simon Pendry , Department of Computing, Imperial College, London, UK. .Sh HISTORY -The -.Nm +.Nm Amq .At diff --git a/usr/src/usr.sbin/amd/amq/amq.c b/usr/src/usr.sbin/amd/amq/amq.c index 65591f8b3b..dc444a1063 100644 --- a/usr/src/usr.sbin/amd/amq/amq.c +++ b/usr/src/usr.sbin/amd/amq/amq.c @@ -1,5 +1,5 @@ /* - * $Id: amq.c,v 5.2 90/06/23 22:20:07 jsp Rel $ + * $Id: amq.c,v 5.2.1.3 91/03/17 17:33:42 jsp Alpha $ * * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine @@ -25,8 +25,8 @@ char copyright[] = "\ #endif /* not lint */ #ifndef lint -static char rcsid[] = "$Id: amq.c,v 5.2 90/06/23 22:20:07 jsp Rel $"; -static char sccsid[] = "@(#)amq.c 5.1 (Berkeley) %G%"; +static char rcsid[] = "$Id: amq.c,v 5.2.1.3 91/03/17 17:33:42 jsp Alpha $"; +static char sccsid[] = "@(#)amq.c 5.2 (Berkeley) %G%"; #endif /* not lint */ #include "am.h" @@ -35,14 +35,18 @@ static char sccsid[] = "@(#)amq.c 5.1 (Berkeley) %G%"; #include #include +static int privsock(); + char *progname; static int flush_flag; static int minfo_flag; static int unmount_flag; static int stats_flag; +static int getvers_flag; static char *debug_opts; static char *logfile; -static char *xlog_opt; +static char *mount_map; +static char *xlog_optstr; static char localhost[] = "localhost"; static char *def_server = localhost; @@ -76,7 +80,7 @@ int *twid; } break; case Full: { - struct tm *tp = localtime(&mt->mt_mounttime); + struct tm *tp = localtime((time_t *) &mt->mt_mounttime); printf("%-*.*s %-*.*s %-*.*s %s\n\t%-5d %-7d %-6d %-7d %-7d %-6d %02d/%02d/%02d %02d:%02d:%02d\n", *dwid, *dwid, *mt->mt_directory ? mt->mt_directory : "/", /* XXX */ @@ -99,7 +103,7 @@ printf("%-*.*s %-*.*s %-*.*s %s\n\t%-5d %-7d %-6d %-7d %-7d %-6d %02d/%02d/%02d } break; case Stats: { - struct tm *tp = localtime(&mt->mt_mounttime); + struct tm *tp = localtime((time_t *) &mt->mt_mounttime); printf("%-*.*s %-5d %-7d %-6d %-7d %-7d %-6d %02d/%02d/%02d %02d:%02d:%02d\n", *dwid, *dwid, *mt->mt_directory ? mt->mt_directory : "/", /* XXX */ @@ -249,7 +253,10 @@ char *argv[]; int errs = 0; char *server; struct sockaddr_in server_addr; - int s = RPC_ANYSOCK; + + /* In order to pass the Amd security check, we must use a priv port. */ + int s; + CLIENT *clnt; struct hostent *hp; int nodefault = 0; @@ -270,10 +277,11 @@ char *argv[]; /* * Parse arguments */ - while ((opt_ch = getopt(argc, argv, "fh:l:msux:D:")) != EOF) + while ((opt_ch = getopt(argc, argv, "fh:l:msuvx:D:M:")) != EOF) switch (opt_ch) { case 'f': flush_flag = 1; + nodefault = 1; break; case 'h': @@ -292,14 +300,21 @@ char *argv[]; case 's': stats_flag = 1; + nodefault = 1; break; case 'u': unmount_flag = 1; + nodefault = 1; + break; + + case 'v': + getvers_flag = 1; + nodefault = 1; break; case 'x': - xlog_opt = optarg; + xlog_optstr = optarg; nodefault = 1; break; @@ -308,16 +323,26 @@ char *argv[]; nodefault = 1; break; + case 'M': + mount_map = optarg; + nodefault = 1; + break; + default: errs = 1; break; } + if (optind == argc) { + if (unmount_flag) + errs = 1; + } + if (errs) { show_usage: fprintf(stderr, "\ -Usage: %s [-h host] [[-f] [-m] | | [-s] | [[-u] directory ...]] |\n\ -\t[-l logfile|\"syslog\"] [-x log_flags] [-D dbg_opts]\n", progname); +Usage: %s [-h host] [[-f] [-m] [-v] [-s]] | [[-u] directory ...]] |\n\ +\t[-l logfile|\"syslog\"] [-x log_flags] [-D dbg_opts] [-M mapent]\n", progname); exit(1); } @@ -340,11 +365,12 @@ Usage: %s [-h host] [[-f] [-m] | | [-s] | [[-u] directory ...]] |\n\ } bzero(&server_addr, sizeof server_addr); server_addr.sin_family = AF_INET; - server_addr.sin_addr = *(struct in_addr *) hp->h_addr; + bcopy((voidp) hp->h_addr, (voidp) &server_addr.sin_addr, sizeof(server_addr.sin_addr)); /* * Create RPC endpoint */ + s = privsock(); clnt = clntudp_create(&server_addr, AMQ_PROGRAM, AMQ_VERSION, TIMEOUT, &s); if (clnt == 0) { fprintf(stderr, "%s: ", progname); @@ -373,14 +399,14 @@ Usage: %s [-h host] [[-f] [-m] | | [-s] | [[-u] directory ...]] |\n\ /* * Control logging */ - if (xlog_opt) { + if (xlog_optstr) { int *rc; amq_setopt opt; opt.as_opt = AMOPT_XLOG; - opt.as_str = xlog_opt; + opt.as_str = xlog_optstr; rc = amqproc_setopt_1(&opt, clnt); if (!rc || *rc) { - fprintf(stderr, "%s: setting log level to \"%s\" failed\n", progname, xlog_opt); + fprintf(stderr, "%s: setting log level to \"%s\" failed\n", progname, xlog_optstr); errs = 1; } } @@ -403,7 +429,7 @@ Usage: %s [-h host] [[-f] [-m] | | [-s] | [[-u] directory ...]] |\n\ /* * Flush map cache */ - if (logfile) { + if (flush_flag) { int *rc; amq_setopt opt; opt.as_opt = AMOPT_FLUSHMAPC; @@ -432,6 +458,38 @@ Usage: %s [-h host] [[-f] [-m] | | [-s] | [[-u] directory ...]] |\n\ } } + /* + * Mount map + */ + if (mount_map) { + int *rc; + do { + rc = amqproc_mount_1(&mount_map, clnt); + } while (rc && *rc < 0); + if (!rc || *rc > 0) { + if (rc) + errno = *rc; + else + errno = ETIMEDOUT; + fprintf(stderr, "%s: could not start new ", progname); + perror("autmount point"); + } + } + + /* + * Get Version + */ + if (getvers_flag) { + amq_string *spp = amqproc_getvers_1((voidp) 0, clnt); + if (spp && *spp) { + printf("%s.\n", *spp); + free(*spp); + } else { + fprintf(stderr, "%s: failed to get version infromation\n", progname); + errs = 1; + } + } + /* * Apply required operation to all remaining arguments */ @@ -454,12 +512,6 @@ Usage: %s [-h host] [[-f] [-m] | | [-s] | [[-u] directory ...]] |\n\ int mwid = 0, dwid = 0, twid = 0; show_mt(mt, Calc, &mwid, &dwid, &twid); mwid++; dwid++, twid++; -#ifdef notdef - printf("\t%s\n%-*.*s %-*.*s %-*.*s %s\n", - "Uid Getattr Lookup RdDir RdLnk Statfs Mounted@", - dwid, dwid, "What", twid, twid, "Type", mwid, mwid, "Info", "Where"); - show_mt(mt, Full, &mwid, &dwid, &twid); -#endif /* notdef */ printf("%-*.*s Uid Getattr Lookup RdDir RdLnk Statfs Mounted@\n", dwid, dwid, "What"); show_mt(mt, Stats, &mwid, &dwid, &twid); @@ -510,6 +562,54 @@ Usage: %s [-h host] [[-f] [-m] | | [-s] | [[-u] directory ...]] |\n\ exit(errs); } +/* + * udpresport creates a datagram socket and attempts to bind it to a + * secure port. + * returns: The bound socket, or -1 to indicate an error. + */ +static int udpresport() +{ + int alport; + struct sockaddr_in addr; + int sock; + + /* Use internet address family */ + addr.sin_family = AF_INET; + addr.sin_addr.s_addr = INADDR_ANY; + if ((sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) + return -1; + for (alport = IPPORT_RESERVED-1; alport > IPPORT_RESERVED/2 + 1; alport--) { + addr.sin_port = htons((u_short)alport); + if (bind(sock, (struct sockaddr *)&addr, sizeof (addr)) >= 0) + return sock; + if (errno != EADDRINUSE) { + close(sock); + return -1; + } + } + close(sock); + errno = EAGAIN; + return -1; +} + +/* + * Privsock() calls udpresport() to attempt to bind a socket to a secure + * port. If udpresport() fails, privsock returns a magic socket number which + * indicates to RPC that it should make its own socket. + * returns: A privileged socket # or RPC_ANYSOCK. + */ +static int privsock() +{ + int sock = udpresport(); + + if (sock < 0) { + errno = 0; + /* Couldn't get a secure port, let RPC make an insecure one */ + sock = RPC_ANYSOCK; + } + return sock; +} + #ifdef DEBUG xfree(f, l, p) char *f, *l; diff --git a/usr/src/usr.sbin/amd/config/Configure b/usr/src/usr.sbin/amd/config/Configure index d7dc24fc88..2e3121acf4 100644 --- a/usr/src/usr.sbin/amd/config/Configure +++ b/usr/src/usr.sbin/amd/config/Configure @@ -10,7 +10,7 @@ # # %sccs.include.redist.sh% # -# @(#)Configure 5.1 (Berkeley) %G% +# @(#)Configure 5.2 (Berkeley) %G% # echo "Making ./arch and ./os-type executable ..." until chmod +x ./arch ./os-type; do echo "Error: chmod command failed" >&2; exit 1; done diff --git a/usr/src/usr.sbin/amd/config/Makefile.aix3 b/usr/src/usr.sbin/amd/config/Makefile.aix3 index 2aa87071fb..7380456d20 100644 --- a/usr/src/usr.sbin/amd/config/Makefile.aix3 +++ b/usr/src/usr.sbin/amd/config/Makefile.aix3 @@ -1,5 +1,5 @@ # -# $Id: Makefile.aix3,v 5.2 90/06/23 22:20:35 jsp Rel $ +# $Id: Makefile.aix3,v 5.2.1.1 90/10/21 22:30:40 jsp Exp $ # # Copyright (c) 1990 Jan-Simon Pendry # Copyright (c) 1990 Imperial College of Science, Technology & Medicine @@ -11,6 +11,6 @@ # # %sccs.include.redist.sh% # -# @(#)Makefile.aix3 5.1 (Berkeley) %G% +# @(#)Makefile.aix3 5.2 (Berkeley) %G% # SYSLIB = -lbsd diff --git a/usr/src/usr.sbin/amd/config/Makefile.bsd44 b/usr/src/usr.sbin/amd/config/Makefile.bsd44 index fefce9d86a..68f4b68bb8 100644 --- a/usr/src/usr.sbin/amd/config/Makefile.bsd44 +++ b/usr/src/usr.sbin/amd/config/Makefile.bsd44 @@ -1,5 +1,5 @@ # -# $Id: Makefile.bsd44,v 5.2 90/06/23 22:20:39 jsp Rel $ +# $Id: Makefile.bsd44,v 5.2.1.1 90/10/21 22:30:45 jsp Exp $ # # Copyright (c) 1989 Jan-Simon Pendry # Copyright (c) 1989 Imperial College of Science, Technology & Medicine @@ -11,7 +11,7 @@ # # %sccs.include.redist.sh% # -# @(#)Makefile.bsd44 5.1 (Berkeley) %G% +# @(#)Makefile.bsd44 5.2 (Berkeley) %G% # # Extra Makefile definitions for 4.4 BSD # diff --git a/usr/src/usr.sbin/amd/config/Makefile.config b/usr/src/usr.sbin/amd/config/Makefile.config index eb3814d390..ae663a0731 100644 --- a/usr/src/usr.sbin/amd/config/Makefile.config +++ b/usr/src/usr.sbin/amd/config/Makefile.config @@ -1,5 +1,5 @@ # -# $Id: Makefile.config,v 5.2 90/06/23 22:21:19 jsp Rel $ +# $Id: Makefile.config,v 5.2.1.4 91/03/03 20:54:39 jsp Alpha $ # # Copyright (c) 1990 Jan-Simon Pendry # Copyright (c) 1990 Imperial College of Science, Technology & Medicine @@ -11,7 +11,7 @@ # # %sccs.include.redist.sh% # -# @(#)Makefile.config 5.1 (Berkeley) %G% +# @(#)Makefile.config 5.2 (Berkeley) %G% # # @@ -49,8 +49,10 @@ # # Include support for Network Information Service (NIS) +# Also define HAS_NIS_RELOAD to include map +# enumeration code implementing "cache:=all" # -#HAS_NIS_MAPS = -DHAS_NIS_MAPS +HAS_NIS_MAPS = -DHAS_NIS_MAPS -DHAS_NIS_RELOAD # # Include support for file maps @@ -59,8 +61,10 @@ HAS_FILE_MAPS = -DHAS_FILE_MAPS # # Include support for Hesiod +# Also define HAS_HESIOD_RELOAD to include zone +# transfer code implementing "cache:=all" # -#HAS_HESIOD_MAPS = -DHAS_HESIOD_MAPS +#HAS_HESIOD_MAPS = -DHAS_HESIOD_MAPS -DHAS_HESIOD_RELOAD # # Include support for /etc/passwd @@ -68,10 +72,9 @@ HAS_FILE_MAPS = -DHAS_FILE_MAPS HAS_PASSWD_MAPS = -DHAS_PASSWD_MAPS # -# Include support for mountd -# Not released - design not complete... +# Include support for union maps # -#HAS_MOUNTD_MAPS = -DHAS_MOUNTD_MAPS +HAS_UNION_MAPS = -DHAS_UNION_MAPS # # Include support for ndbm. @@ -80,9 +83,14 @@ HAS_PASSWD_MAPS = -DHAS_PASSWD_MAPS # #HAS_NDBM_MAPS = -DHAS_NDBM_MAPS +# +# Include support for "regexp" maps +# +HAS_REGEXP = -DHAS_REGEXP ############################################################## # Do NOT edit the following lines # CONFIG = ${XINCLUDE} ${HAS_NIS_MAPS} ${HAS_FILE_MAPS} ${HAS_HESIOD_MAPS} \ - ${HAS_NDBM_MAPS} ${HAS_MOUNTD_MAPS} ${HAS_PASSWD_MAPS} + ${HAS_NDBM_MAPS} ${HAS_MOUNTD_MAPS} ${HAS_PASSWD_MAPS} ${HAS_UNION_MAPS} \ + ${HAS_REGEXP} diff --git a/usr/src/usr.sbin/amd/config/Makefile.hpux b/usr/src/usr.sbin/amd/config/Makefile.hpux index 495c36b7e5..1f1cc29420 100644 --- a/usr/src/usr.sbin/amd/config/Makefile.hpux +++ b/usr/src/usr.sbin/amd/config/Makefile.hpux @@ -1,5 +1,5 @@ # -# $Id: Makefile.hpux,v 5.2 90/06/23 22:20:49 jsp Rel $ +# $Id: Makefile.hpux,v 5.2.1.2 90/12/21 16:42:22 jsp Alpha $ # # Copyright (c) 1989 Jan-Simon Pendry # Copyright (c) 1989 Imperial College of Science, Technology & Medicine @@ -11,11 +11,14 @@ # # %sccs.include.redist.sh% # -# @(#)Makefile.hpux 5.1 (Berkeley) %G% +# @(#)Makefile.hpux 5.2 (Berkeley) %G% # # Extra Makefile definitions for HP-UX # #CC = gcc ${GCCOPTS} +# Works only on HP300 CC = cc -Wc,-Nd2000 -OLDCC = cc -Wc,-Nd2000 +SYSCC = $(CC) +# Works only Hp800 +# CC = cc diff --git a/usr/src/usr.sbin/amd/config/Makefile.irix b/usr/src/usr.sbin/amd/config/Makefile.irix index dd9ea18826..d52e3eb9c0 100644 --- a/usr/src/usr.sbin/amd/config/Makefile.irix +++ b/usr/src/usr.sbin/amd/config/Makefile.irix @@ -9,21 +9,9 @@ # This code is derived from software contributed to Berkeley by # Jan-Simon Pendry at Imperial College, London. # -# Redistribution and use in source and binary forms are permitted provided -# that: (1) source distributions retain this entire copyright notice and -# comment, and (2) distributions including binaries display the following -# acknowledgement: ``This product includes software developed by the -# University of California, Berkeley and its contributors'' in the -# documentation or other materials provided with the distribution and in -# all advertising materials mentioning features or use of this software. -# Neither the name of the University nor the names of its contributors may -# be used to endorse or promote products derived from this software without -# specific prior written permission. -# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +# %sccs.include.redist.sh% # -# @(#)Makefile.irix 5.1 (Berkeley) %G% +# @(#)Makefile.irix 5.2 (Berkeley) %G% # # Extra Makefile definitions for IRIX # diff --git a/usr/src/usr.sbin/amd/config/arch b/usr/src/usr.sbin/amd/config/arch index 8953d09fbc..a2cb0bf452 100644 --- a/usr/src/usr.sbin/amd/config/arch +++ b/usr/src/usr.sbin/amd/config/arch @@ -1,6 +1,6 @@ #! /bin/sh # -# $Id: arch,v 5.2 90/06/23 22:21:22 jsp Rel $ +# $Id: arch,v 5.2.1.3 91/03/03 20:53:24 jsp Alpha $ # # Copyright (c) 1989 Jan-Simon Pendry # Copyright (c) 1989 Imperial College of Science, Technology & Medicine @@ -12,7 +12,7 @@ # # %sccs.include.redist.sh% # -# @(#)arch 5.1 (Berkeley) %G% +# @(#)arch 5.2 (Berkeley) %G% # # Figure out machine architecture # @@ -45,36 +45,51 @@ then esac ;; A/UX) echo macII ; exit 0 ;; - *) ;; + dgux) MACH="`uname -m`" + case "$MACH" in + AViiON) echo aviion; exit 0;; + esac + ;; + *) MACH="`uname -m`" + case "$MACH" in + IP6) echo mips; exit 0;; + *) ;; + esac + ;; esac fi # # Take a pot-shot at your machine architecture # -echo " ... No ARCH= option specified; dynamically determining architecture" >&2 +echo "# ... No ARCH= option specified; dynamically determining architecture" >&2 case "`exec 2>/dev/null; head -2 /etc/motd`" in *"HP-UX"*) ARCH=hp9000;; +*"Iris"*) ARCH=iris4d;; *"Ultrix"*) ARCH=vax;; *"RISC iX"*) ARCH=arm;; *"Umax 4.2"*) ARCH=encore;; *"Alliant Concentrix"*) ARCH=alliant;; *"FPS Model 500"*) ARCH=fps500;; +*"HCX/UX"*) ARCH=harris;; *) ARCH=unknown; if [ -d /usr/include/caif ]; then ARCH=ibm032 elif [ -f /bin/pyr ]; then if /bin/pyr; then - echo pyr; exit 0 + ARCH=pyr fi + elif [ -d /NextApps ]; then + ARCH=next + elif [ -f /etc/comply ]; then + # Tex 4300 is essentially a sun 3. + ARCH=sun3 fi ;; -fi - esac -echo " ... architecture appears to be \"${ARCH}\"" >&2 +echo "# ... architecture appears to be \"${ARCH}\"" >&2 echo $ARCH case "$ARCH" in diff --git a/usr/src/usr.sbin/amd/config/misc-aix3.h b/usr/src/usr.sbin/amd/config/misc-aix3.h index aa722ad614..813841fb9f 100644 --- a/usr/src/usr.sbin/amd/config/misc-aix3.h +++ b/usr/src/usr.sbin/amd/config/misc-aix3.h @@ -1,5 +1,5 @@ /* - * $Id: misc-aix3.h,v 5.2 90/06/23 22:20:34 jsp Rel $ + * $Id: misc-aix3.h,v 5.2.1.1 90/10/21 22:30:39 jsp Exp $ * * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine @@ -11,7 +11,7 @@ * * %sccs.include.redist.c% * - * @(#)misc-aix3.h 5.1 (Berkeley) %G% + * @(#)misc-aix3.h 5.2 (Berkeley) %G% */ struct ufs_args { diff --git a/usr/src/usr.sbin/amd/config/misc-hpux.h b/usr/src/usr.sbin/amd/config/misc-hpux.h index f5bb6ee88c..04b5d27596 100644 --- a/usr/src/usr.sbin/amd/config/misc-hpux.h +++ b/usr/src/usr.sbin/amd/config/misc-hpux.h @@ -1,5 +1,5 @@ /* - * $Id: misc-hpux.h,v 5.2 90/06/23 22:20:48 jsp Rel $ + * $Id: misc-hpux.h,v 5.2.1.1 90/10/21 22:30:54 jsp Exp $ * * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine @@ -11,7 +11,7 @@ * * %sccs.include.redist.c% * - * @(#)misc-hpux.h 5.1 (Berkeley) %G% + * @(#)misc-hpux.h 5.2 (Berkeley) %G% */ /* diff --git a/usr/src/usr.sbin/amd/config/misc-irix.h b/usr/src/usr.sbin/amd/config/misc-irix.h index 1741ce6163..9639a9c8c2 100644 --- a/usr/src/usr.sbin/amd/config/misc-irix.h +++ b/usr/src/usr.sbin/amd/config/misc-irix.h @@ -9,21 +9,9 @@ * This code is derived from software contributed to Berkeley by * Jan-Simon Pendry at Imperial College, London. * - * Redistribution and use in source and binary forms are permitted provided - * that: (1) source distributions retain this entire copyright notice and - * comment, and (2) distributions including binaries display the following - * acknowledgement: ``This product includes software developed by the - * University of California, Berkeley and its contributors'' in the - * documentation or other materials provided with the distribution and in - * all advertising materials mentioning features or use of this software. - * Neither the name of the University nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * %sccs.include.redist.c% * - * @(#)misc-irix.h 5.1 (Berkeley) %G% + * @(#)misc-irix.h 5.2 (Berkeley) %G% */ #include diff --git a/usr/src/usr.sbin/amd/config/misc-next.h b/usr/src/usr.sbin/amd/config/misc-next.h index 7eb9048a2a..bbb1be3a0a 100644 --- a/usr/src/usr.sbin/amd/config/misc-next.h +++ b/usr/src/usr.sbin/amd/config/misc-next.h @@ -9,21 +9,9 @@ * This code is derived from software contributed to Berkeley by * Jan-Simon Pendry at Imperial College, London. * - * Redistribution and use in source and binary forms are permitted provided - * that: (1) source distributions retain this entire copyright notice and - * comment, and (2) distributions including binaries display the following - * acknowledgement: ``This product includes software developed by the - * University of California, Berkeley and its contributors'' in the - * documentation or other materials provided with the distribution and in - * all advertising materials mentioning features or use of this software. - * Neither the name of the University nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * %sccs.include.redist.c% * - * @(#)misc-next.h 5.1 (Berkeley) %G% + * @(#)misc-next.h 5.2 (Berkeley) %G% */ #include diff --git a/usr/src/usr.sbin/amd/config/misc-ultrix.h b/usr/src/usr.sbin/amd/config/misc-ultrix.h index 77014cdc94..60701fe7b0 100644 --- a/usr/src/usr.sbin/amd/config/misc-ultrix.h +++ b/usr/src/usr.sbin/amd/config/misc-ultrix.h @@ -1,5 +1,5 @@ /* - * $Id: misc-ultrix.h,v 5.2 90/06/23 22:20:56 jsp Rel $ + * $Id: misc-ultrix.h,v 5.2.1.1 90/10/21 22:31:08 jsp Exp $ * * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine @@ -11,7 +11,7 @@ * * %sccs.include.redist.c% * - * @(#)misc-ultrix.h 5.1 (Berkeley) %G% + * @(#)misc-ultrix.h 5.2 (Berkeley) %G% */ #include diff --git a/usr/src/usr.sbin/amd/config/mount_aix.c b/usr/src/usr.sbin/amd/config/mount_aix.c index 0d719d6e28..8467d7b4d2 100644 --- a/usr/src/usr.sbin/amd/config/mount_aix.c +++ b/usr/src/usr.sbin/amd/config/mount_aix.c @@ -9,21 +9,9 @@ * This code is derived from software contributed to Berkeley by * Jan-Simon Pendry at Imperial College, London. * - * Redistribution and use in source and binary forms are permitted provided - * that: (1) source distributions retain this entire copyright notice and - * comment, and (2) distributions including binaries display the following - * acknowledgement: ``This product includes software developed by the - * University of California, Berkeley and its contributors'' in the - * documentation or other materials provided with the distribution and in - * all advertising materials mentioning features or use of this software. - * Neither the name of the University nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * %sccs.include.redist.c% * - * @(#)mount_aix.c 5.1 (Berkeley) %G% + * @(#)mount_aix.c 5.2 (Berkeley) %G% */ diff --git a/usr/src/usr.sbin/amd/config/mount_irix.c b/usr/src/usr.sbin/amd/config/mount_irix.c index d75dc650c3..e41a1ca230 100644 --- a/usr/src/usr.sbin/amd/config/mount_irix.c +++ b/usr/src/usr.sbin/amd/config/mount_irix.c @@ -9,21 +9,9 @@ * This code is derived from software contributed to Berkeley by * Jan-Simon Pendry at Imperial College, London. * - * Redistribution and use in source and binary forms are permitted provided - * that: (1) source distributions retain this entire copyright notice and - * comment, and (2) distributions including binaries display the following - * acknowledgement: ``This product includes software developed by the - * University of California, Berkeley and its contributors'' in the - * documentation or other materials provided with the distribution and in - * all advertising materials mentioning features or use of this software. - * Neither the name of the University nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * %sccs.include.redist.c% * - * @(#)mount_irix.c 5.1 (Berkeley) %G% + * @(#)mount_irix.c 5.2 (Berkeley) %G% */ diff --git a/usr/src/usr.sbin/amd/config/mtab_aix.c b/usr/src/usr.sbin/amd/config/mtab_aix.c index c4a0065b51..4fd618d23b 100644 --- a/usr/src/usr.sbin/amd/config/mtab_aix.c +++ b/usr/src/usr.sbin/amd/config/mtab_aix.c @@ -1,5 +1,5 @@ /* - * $Id: mtab_aix.c,v 5.2 90/06/23 22:20:36 jsp Rel $ + * $Id: mtab_aix.c,v 5.2.1.1 90/10/21 22:30:40 jsp Exp $ * * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine @@ -11,7 +11,7 @@ * * %sccs.include.redist.c% * - * @(#)mtab_aix.c 5.1 (Berkeley) %G% + * @(#)mtab_aix.c 5.2 (Berkeley) %G% */ #include "am.h" @@ -32,7 +32,12 @@ struct vmount *mp; new_mp->mnt_opts = strdup(vmt2dataptr(mp, VMT_ARGS)); switch (mp->vmt_gfstype) { case MNT_JFS: ty = MTAB_TYPE_UFS; break; - case MNT_NFS: ty = MTAB_TYPE_NFS; break; + case MNT_NFS: + ty = MTAB_TYPE_NFS; + new_mp->mnt_fsname = str3cat(new_mp->mnt_fsname, + vmt2dataptr(mp, VMT_HOSTNAME), + ":", new_mp->mnt_fsname); + break; default: ty = "unknown"; break; } new_mp->mnt_type = strdup(ty); diff --git a/usr/src/usr.sbin/amd/config/mtab_bsd.c b/usr/src/usr.sbin/amd/config/mtab_bsd.c index 727a9c91c6..3276c37427 100644 --- a/usr/src/usr.sbin/amd/config/mtab_bsd.c +++ b/usr/src/usr.sbin/amd/config/mtab_bsd.c @@ -1,5 +1,5 @@ /* - * $Id: mtab_bsd.c,v 5.2 90/06/23 22:20:40 jsp Rel $ + * $Id: mtab_bsd.c,v 5.2.1.1 90/10/21 22:30:46 jsp Exp $ * * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine @@ -11,7 +11,7 @@ * * %sccs.include.redist.c% * - * @(#)mtab_bsd.c 5.1 (Berkeley) %G% + * @(#)mtab_bsd.c 5.2 (Berkeley) %G% */ #include "am.h" diff --git a/usr/src/usr.sbin/amd/config/mtab_file.c b/usr/src/usr.sbin/amd/config/mtab_file.c index d65108a36c..4b0ca09f10 100644 --- a/usr/src/usr.sbin/amd/config/mtab_file.c +++ b/usr/src/usr.sbin/amd/config/mtab_file.c @@ -1,5 +1,5 @@ /* - * $Id: mtab_file.c,v 5.2 90/06/23 22:20:54 jsp Rel $ + * $Id: mtab_file.c,v 5.2.1.2 91/03/03 20:51:24 jsp Alpha $ * * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine @@ -11,7 +11,7 @@ * * %sccs.include.redist.c% * - * @(#)mtab_file.c 5.1 (Berkeley) %G% + * @(#)mtab_file.c 5.2 (Berkeley) %G% */ #include "am.h" @@ -81,9 +81,144 @@ again: #endif /* LOCK_FCNTL */ #endif /* MTAB_LOCKING */ +static FILE *open_locked_mtab(mtab_file, mode, fs) +char *mtab_file; +char *mode; +char *fs; +{ + FILE *mfp = 0; + +#ifdef UPDATE_MTAB + /* + * There is a possible race condition if two processes enter + * this routine at the same time. One will be blocked by the + * exclusive lock below (or by the shared lock in setmntent) + * and by the time the second process has the exclusive lock + * it will be on the wrong underlying object. To check for this + * the mtab file is stat'ed before and after all the locking + * sequence, and if it is a different file then we assume that + * it may be the wrong file (only "may", since there is another + * race between the initial stat and the setmntent). + * + * Simpler solutions to this problem are invited... + */ + int racing = 2; +#ifdef MTAB_LOCKING + int rc; + int retries = 0; + struct stat st_before, st_after; +#endif /* MTAB_LOCKING */ + + if (mnt_file) { +#ifdef DEBUG + dlog("Forced close on %s in read_mtab", mtab_file); +#endif /* DEBUG */ + endmntent(mnt_file); + mnt_file = 0; + } + +#ifdef MTAB_LOCKING +again: + if (mfp) { + endmntent(mfp); + mfp = 0; + } + + clock_valid = 0; + if (stat(mtab_file, &st_before) < 0) { + plog(XLOG_ERROR, "%s: stat: %m", mtab_file); + if (errno == ESTALE) { + /* happens occasionally */ + sleep(1); + goto again; + } + return 0; + } +#endif /* MTAB_LOCKING */ +#endif /* UPDATE_MTAB */ + +eacces: + mfp = setmntent(mtab_file, mode); + if (!mfp) { + /* + * Since setmntent locks the descriptor, it + * is possible it can fail... so retry if + * needed. + */ + if (errno == EACCES || errno == EAGAIN) { +#ifdef DEBUG + dlog("Blocked, trying to obtain exclusive mtab lock"); +#endif /* DEBUG */ + goto eacces; + } else if (errno == ENFILE && retries++ < NFILE_RETRIES) { + sleep(1); + goto eacces; + } + + plog(XLOG_ERROR, "setmntent(\"%s\", \"%s\"): %m", mtab_file, mode); + return 0; + } + +#ifdef MTAB_LOCKING +#ifdef UPDATE_MTAB + /* + * At this point we have an exclusive lock on the mount list, + * but it may be the wrong one so... + */ + + /* + * Need to get an exclusive lock on the current + * mount table until we have a new copy written + * out, when the lock is released in free_mntlist. + * flock is good enough since the mount table is + * not shared between machines. + */ + do + rc = lock(fileno(mfp)); + while (rc < 0 && errno == EINTR); + if (rc < 0) { + plog(XLOG_ERROR, "Couldn't lock %s: %m", mtab_file); + endmntent(mfp); + return 0; + } + /* + * Now check whether the mtab file has changed under our feet + */ + if (stat(mtab_file, &st_after) < 0) { + plog(XLOG_ERROR, "%s: stat", mtab_file); + goto again; + } + + if (st_before.st_dev != st_after.st_dev || + st_before.st_ino != st_after.st_ino) { + struct timeval tv; + if (racing == 0) { + /* Sometimes print a warning */ + plog(XLOG_WARNING, + "Possible mount table race - retrying %s", fs); + } + racing = (racing+1) & 3; + /* + * Take a nap. From: Doug Kingston + */ + tv.tv_sec = 0; + tv.tv_usec = (mypid & 0x07) << 17; + if (tv.tv_usec) + if (select(0, (voidp) 0, (voidp) 0, (voidp) 0, &tv) < 0) + plog(XLOG_WARNING, "mtab nap failed: %m"); + + goto again; + } +#endif /* UPDATE_MTAB */ +#endif /* MTAB_LOCKING */ + + return mfp; +} + /* * Unlock the mount table */ +void unlock_mntlist P((void)); void unlock_mntlist() { /* @@ -186,7 +321,7 @@ struct mntent *mp; int retries = 0; FILE *mfp; enfile: - mfp = setmntent(mtab, "a"); + mfp = open_locked_mtab(mtab, "a", mp->mnt_dir); if (mfp) { #ifdef MTAB_STRIPNL mtab_stripnl(mp->mnt_opts); @@ -218,6 +353,13 @@ struct mntent *mp; new_mp->mnt_freq = mp->mnt_freq; new_mp->mnt_passno = mp->mnt_passno; +#ifdef FIXUP_MNTENT_DUP + /* + * Additional fields get dup'ed here + */ + FIXUP_MNTENT_DUP(new_mp, mp); +#endif + return new_mp; } @@ -230,121 +372,10 @@ char *fs; mntlist **mpp, *mhp; struct mntent *mep; - FILE *mfp = 0; - -#ifdef UPDATE_MTAB - /* - * There is a possible race condition if two processes enter - * this routine at the same time. One will be blocked by the - * exclusive lock below (or by the shared lock in setmntent) - * and by the time the second process has the exclusive lock - * it will be on the wrong underlying object. To check for this - * the mtab file is stat'ed before and after all the locking - * sequence, and if it is a different file then we assume that - * it may be the wrong file (only "may", since there is another - * race between the initial stat and the setmntent). - * - * Simpler solutions to this problem are invited... - */ - int racing = 0; -#ifdef MTAB_LOCKING - int rc; - int retries = 0; - struct stat st_before, st_after; -#endif /* MTAB_LOCKING */ + FILE *mfp = open_locked_mtab(mtab, "r+", fs); - if (mnt_file) { -#ifdef DEBUG - dlog("Forced close on %s in read_mtab", mtab); -#endif /* DEBUG */ - endmntent(mnt_file); - mnt_file = 0; - } - -#ifdef MTAB_LOCKING -again: - if (mfp) { - endmntent(mfp); - mfp = 0; - } - - clock_valid = 0; - if (stat(mtab, &st_before) < 0) { - plog(XLOG_ERROR, "%s: stat: %m", mtab); - if (errno == ESTALE) { - /* happens occasionally */ - sleep(1); - goto again; - } + if (!mfp) return 0; - } -#endif /* MTAB_LOCKING */ -#endif /* UPDATE_MTAB */ - -eacces: - mfp = setmntent(mtab, "r+"); - if (!mfp) { - /* - * Since setmntent locks the descriptor, it - * is possible it can fail... so retry if - * needed. - */ - if (errno == EACCES || errno == EAGAIN) { -#ifdef DEBUG - dlog("Blocked, trying to obtain exclusive mtab lock"); -#endif /* DEBUG */ - goto eacces; - } else if (errno == ENFILE && retries++ < NFILE_RETRIES) { - sleep(1); - goto eacces; - } - - plog(XLOG_ERROR, "setmntent(\"%s\", \"r+\"): %m", mtab); - return 0; - } - -#ifdef MTAB_LOCKING -#ifdef UPDATE_MTAB - /* - * At this point we have an exclusive lock on the mount list, - * but it may be the wrong one so... - */ - - /* - * Need to get an exclusive lock on the current - * mount table until we have a new copy written - * out, when the lock is released in free_mntlist. - * flock is good enough since the mount table is - * not shared between machines. - */ - do - rc = lock(fileno(mfp)); - while (rc < 0 && errno == EINTR); - if (rc < 0) { - plog(XLOG_ERROR, "Couldn't lock %s: %m", mtab); - endmntent(mfp); - return 0; - } - /* - * Now check whether the mtab file has changed under our feet - */ - if (stat(mtab, &st_after) < 0) { - plog(XLOG_ERROR, "%s: stat", mtab); - goto again; - } - - if (st_before.st_dev != st_after.st_dev || - st_before.st_ino != st_after.st_ino) { - if (racing == 0) { - /* Sometimes print a warning */ - plog(XLOG_WARNING, - "Possible mount table race - retrying %s", fs); - } - racing = (racing+1) & 3; - goto again; - } -#endif /* UPDATE_MTAB */ -#endif /* MTAB_LOCKING */ mpp = &mhp; diff --git a/usr/src/usr.sbin/amd/config/mtab_ultrix.c b/usr/src/usr.sbin/amd/config/mtab_ultrix.c index 47df1b6c01..bf351a5ce5 100644 --- a/usr/src/usr.sbin/amd/config/mtab_ultrix.c +++ b/usr/src/usr.sbin/amd/config/mtab_ultrix.c @@ -1,5 +1,5 @@ /* - * $Id: mtab_ultrix.c,v 5.2 90/06/23 22:20:57 jsp Rel $ + * $Id: mtab_ultrix.c,v 5.2.1.1 90/10/21 22:31:08 jsp Exp $ * * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine @@ -11,7 +11,7 @@ * * %sccs.include.redist.c% * - * @(#)mtab_ultrix.c 5.1 (Berkeley) %G% + * @(#)mtab_ultrix.c 5.2 (Berkeley) %G% */ #include "am.h" diff --git a/usr/src/usr.sbin/amd/config/newvers.sh b/usr/src/usr.sbin/amd/config/newvers.sh index d2f4fd1bad..23b5dc6d5b 100644 --- a/usr/src/usr.sbin/amd/config/newvers.sh +++ b/usr/src/usr.sbin/amd/config/newvers.sh @@ -1,6 +1,6 @@ #!/bin/sh - # -# $Id: newvers.sh,v 5.2 90/06/23 22:21:21 jsp Rel $ +# $Id: newvers.sh,v 5.2.1.2 91/03/17 17:41:03 jsp Alpha $ # # Copyright (c) 1989 Jan-Simon Pendry # Copyright (c) 1989 Imperial College of Science, Technology & Medicine @@ -12,10 +12,10 @@ # # %sccs.include.redist.sh% # -# @(#)newvers.sh 5.2 (Berkeley) %G% +# @(#)newvers.sh 5.3 (Berkeley) %G% # -PATH=/usr/ucb:/bin:/usr/bin -if [ $# -ne 1 ]; then echo "Usage: newvers program" >&2; exit 1; fi +PATH=/usr/ucb:/bin:/usr/bin:$PATH +if [ $# -ne 3 ]; then echo "Usage: newvers program arch os" >&2; exit 1; fi version="version.$1" if [ ! -r $version ]; then echo 0 > $version; chmod 444 $version; fi v=`cat $version` @@ -23,19 +23,40 @@ u=${USER-${LOGNAME-root}} h=`hostname` #h=`expr "$h" : '\([^.]*\)'` t=`date` -r=`cat $d../config/RELEASE` -c=`sed 's/$/\\\\n\\\\/' $d../text/COPYRIGHT` -if [ -z "$r" -o -z "$c" ]; then +if [ ! -s "$d../config/RELEASE" -o ! -s "$d../text/COPYRIGHT" ]; then echo ERROR: config file missing >&2 exit 1 fi rm -f vers.$1.c -cat > vers.$1.c << %% +( +cat << %% +char copyright[] = "\\ +%% +sed 's/$/\\n\\/' $d../text/COPYRIGHT +cat << %% +"; char version[] = "\\ -${c} -$1 ${r} #${v}: ${t}\\n\\ -Built by ${u}@${h}"; %% +cat << %% +$1 \\ +%% +sed \ + -e 's/\$//g' \ + -e 's/[A-Z][a-z]*://g' \ + -e 's/ */ /g' \ + -e 's/^ //' \ + -e 's/$/\\/' \ + $d../config/RELEASE +cat << %% + #${v}: ${t}\\n\\ +Built by ${u}@${h} for \\ +%% +case "$2" in +[aeiou]*) echo "an \\" ;; +*) echo "a \\";; +esac +echo "$2 running $3\";" +) > vers.$1.c rm -f $version -/bin/echo `expr ${v} + 1` > $version +expr ${v} + 1 > $version chmod 444 $version diff --git a/usr/src/usr.sbin/amd/config/os-acis43.h b/usr/src/usr.sbin/amd/config/os-acis43.h index 2f50adf2e2..ce6b162ef9 100644 --- a/usr/src/usr.sbin/amd/config/os-acis43.h +++ b/usr/src/usr.sbin/amd/config/os-acis43.h @@ -1,4 +1,4 @@ -/* $Id: os-acis43.h,v 5.2 90/06/23 22:20:32 jsp Rel $ */ +/* $Id: os-acis43.h,v 5.2.1.1 90/10/21 22:30:37 jsp Exp $ */ /* * IBM RT ACIS4.3 definitions for Amd (automounter) @@ -13,7 +13,7 @@ * * %sccs.include.redist.c% * - * @(#)os-acis43.h 5.1 (Berkeley) %G% + * @(#)os-acis43.h 5.2 (Berkeley) %G% */ /* @@ -45,3 +45,13 @@ */ #define MOUNT_TYPE_NFS MOUNT_NFS #define MOUNT_TYPE_UFS MOUNT_UFS +#undef MTAB_TYPE_UFS +#define MTAB_TYPE_UFS "ufs" + +#undef ARCH_ENDIAN +#define ARCH_ENDIAN "big" + +/* + * Need precise symlink lengths +#define PRECISE_SYMLINKS + */ diff --git a/usr/src/usr.sbin/amd/config/os-aix3.h b/usr/src/usr.sbin/amd/config/os-aix3.h index 92f1389831..db8ee96650 100644 --- a/usr/src/usr.sbin/amd/config/os-aix3.h +++ b/usr/src/usr.sbin/amd/config/os-aix3.h @@ -1,4 +1,4 @@ -/* $Id: os-aix3.h,v 5.2 90/06/23 22:20:33 jsp Rel $ */ +/* $Id: os-aix3.h,v 5.2.1.1 90/10/21 22:30:38 jsp Exp $ */ /* * AIX 3.1 definitions for Amd (automounter) @@ -13,7 +13,7 @@ * * %sccs.include.redist.c% * - * @(#)os-aix3.h 5.1 (Berkeley) %G% + * @(#)os-aix3.h 5.2 (Berkeley) %G% */ /* @@ -116,7 +116,7 @@ struct mntent { #define NFS_HDR "misc-aix3.h" #define UFS_HDR "misc-aix3.h" #undef NFS_FH_DREF -#define NFS_FH_DREF(dst, src) { (dst).addr = *(src); } +#define NFS_FH_DREF(dst, src) { (dst) = *(src); } #undef NFS_SA_DREF #define NFS_SA_DREF(dst, src) { (dst).addr = *(src); } #define M_RDONLY MNT_READONLY @@ -146,7 +146,7 @@ static nfs_errormap[] = { 0,75,77,99,99,99, \ 99,99,99,71,99,99,99,99,99,99 \ }; -#define MOUNT_AIX3 +#define MOUNT_HELPER_SOURCE "mount_aix.c" /* * Need this too diff --git a/usr/src/usr.sbin/amd/config/os-aux.h b/usr/src/usr.sbin/amd/config/os-aux.h index eb1174929c..40c2cb07e7 100644 --- a/usr/src/usr.sbin/amd/config/os-aux.h +++ b/usr/src/usr.sbin/amd/config/os-aux.h @@ -1,4 +1,4 @@ -/* $Id: os-aux.h,v 5.2 90/06/23 22:20:37 jsp Rel $ */ +/* $Id: os-aux.h,v 5.2.1.1 90/10/21 22:30:42 jsp Exp $ */ /* * A/UX macII definitions for Amd (automounter) @@ -14,7 +14,7 @@ * * %sccs.include.redist.c% * - * @(#)os-aux.h 5.1 (Berkeley) %G% + * @(#)os-aux.h 5.2 (Berkeley) %G% */ /* @@ -42,11 +42,6 @@ #undef ARCH_ENDIAN #define ARCH_ENDIAN "big" -/* - * Has support for syslog() - */ -#define HAS_SYSLOG - /* * No support for ndbm */ diff --git a/usr/src/usr.sbin/amd/config/os-bsd44.h b/usr/src/usr.sbin/amd/config/os-bsd44.h index e062962852..2f0e5c884f 100644 --- a/usr/src/usr.sbin/amd/config/os-bsd44.h +++ b/usr/src/usr.sbin/amd/config/os-bsd44.h @@ -1,4 +1,4 @@ -/* $Id: os-bsd44.h,v 5.2 90/06/23 22:20:38 jsp Rel $ */ +/* $Id: os-bsd44.h,v 5.2.1.2 90/11/04 23:17:39 jsp Exp $ */ /* * 4.4 BSD definitions for Amd (automounter) @@ -13,7 +13,7 @@ * * %sccs.include.redist.c% * - * @(#)os-bsd44.h 5.1 (Berkeley) %G% + * @(#)os-bsd44.h 5.2 (Berkeley) %G% */ /* @@ -26,7 +26,7 @@ * This is the implementation release number, not * the protocol revision number. */ -#define RPC_3 +#define RPC_4 /* * Which version of the NFS interface are we using. @@ -41,6 +41,11 @@ */ #define OS_HAS_NDBM +/* + * 4.4 doesn't provide NIS. + */ +#undef HAS_NIS_MAPS + /* * The mount table is obtained from the kernel */ @@ -98,7 +103,6 @@ XXX - Probably no hope of running Amd on this machine! /* * Miscellaneous 4.4 BSD bits */ -#define MISC_RPC #define NEED_MNTOPT_PARSER #define SHORT_MOUNT_NAME @@ -145,3 +149,9 @@ struct mntent { * mounted filesystem. */ #define NFS_ARGS_NEEDS_PATH + +/* + * 4.4 has RE support built in + */ +#undef RE_HDR +#define RE_HDR diff --git a/usr/src/usr.sbin/amd/config/os-concentrix.h b/usr/src/usr.sbin/amd/config/os-concentrix.h index 8001e50ec6..0b5bfed090 100644 --- a/usr/src/usr.sbin/amd/config/os-concentrix.h +++ b/usr/src/usr.sbin/amd/config/os-concentrix.h @@ -1,4 +1,4 @@ -/* $Id: os-concentrix.h,v 5.2 90/06/23 22:20:41 jsp Rel $ */ +/* $Id: os-concentrix.h,v 5.2.1.1 90/10/21 22:30:47 jsp Exp $ */ /* * Alliant Concentrix 5.0.0 definitions for Amd (automounter) @@ -13,7 +13,7 @@ * * %sccs.include.redist.c% * - * @(#)os-concentrix.h 5.1 (Berkeley) %G% + * @(#)os-concentrix.h 5.2 (Berkeley) %G% */ /* diff --git a/usr/src/usr.sbin/amd/config/os-convex.h b/usr/src/usr.sbin/amd/config/os-convex.h index 662b810cc4..d2677fd9d1 100644 --- a/usr/src/usr.sbin/amd/config/os-convex.h +++ b/usr/src/usr.sbin/amd/config/os-convex.h @@ -1,4 +1,4 @@ -/* $Id: os-convex.h,v 5.2 90/06/23 22:20:42 jsp Rel $ */ +/* $Id: os-convex.h,v 5.2.1.1 90/10/21 22:30:48 jsp Exp $ */ /* * Convex C220, version 7.1 definitions for Amd (automounter) @@ -14,7 +14,7 @@ * * %sccs.include.redist.c% * - * @(#)os-convex.h 5.1 (Berkeley) %G% + * @(#)os-convex.h 5.2 (Berkeley) %G% */ diff --git a/usr/src/usr.sbin/amd/config/os-defaults.h b/usr/src/usr.sbin/amd/config/os-defaults.h index 557ef59505..d61019f8ec 100644 --- a/usr/src/usr.sbin/amd/config/os-defaults.h +++ b/usr/src/usr.sbin/amd/config/os-defaults.h @@ -1,4 +1,4 @@ -/* $Id: os-defaults.h,v 5.2 90/06/23 22:20:44 jsp Rel $ */ +/* $Id: os-defaults.h,v 5.2.1.2 91/03/03 20:49:12 jsp Alpha $ */ /* * Common OS definitions. These may be overridden in @@ -14,7 +14,7 @@ * * %sccs.include.redist.c% * - * @(#)os-defaults.h 5.1 (Berkeley) %G% + * @(#)os-defaults.h 5.2 (Berkeley) %G% */ /* @@ -100,3 +100,18 @@ * How to get a mount list */ #define READ_MTAB_FROM_FILE + +/* + * Make Amd automount points appear + * to be zero sized. undef this + * if the O/S has a divide by zero + * problem in df et al. + */ +#define HAS_EMPTY_AUTOMOUNTS + +/* + * For the RE matcher + */ +#define CHARBITS 0377 +#define STRCSPN +#define RE_HDR "re.h" diff --git a/usr/src/usr.sbin/amd/config/os-dgux.h b/usr/src/usr.sbin/amd/config/os-dgux.h index 2597695f08..3b685473da 100644 --- a/usr/src/usr.sbin/amd/config/os-dgux.h +++ b/usr/src/usr.sbin/amd/config/os-dgux.h @@ -11,21 +11,9 @@ * This code is derived from software contributed to Berkeley by * Jan-Simon Pendry at Imperial College, London. * - * Redistribution and use in source and binary forms are permitted provided - * that: (1) source distributions retain this entire copyright notice and - * comment, and (2) distributions including binaries display the following - * acknowledgement: ``This product includes software developed by the - * University of California, Berkeley and its contributors'' in the - * documentation or other materials provided with the distribution and in - * all advertising materials mentioning features or use of this software. - * Neither the name of the University nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * %sccs.include.redist.c% * - * @(#)os-dgux.h 5.1 (Berkeley) %G% + * @(#)os-dgux.h 5.2 (Berkeley) %G% */ /* diff --git a/usr/src/usr.sbin/amd/config/os-fpx4.h b/usr/src/usr.sbin/amd/config/os-fpx4.h index 480866e9e4..6f2a59a63c 100644 --- a/usr/src/usr.sbin/amd/config/os-fpx4.h +++ b/usr/src/usr.sbin/amd/config/os-fpx4.h @@ -1,4 +1,4 @@ -/* $Id: os-fpx4.h,v 5.2 90/06/23 22:20:45 jsp Rel $ */ +/* $Id: os-fpx4.h,v 5.2.1.1 90/10/21 22:30:51 jsp Exp $ */ /* * Celerity FPX 4.1/2 definitions for Amd (automounter) @@ -14,7 +14,7 @@ * * %sccs.include.redist.c% * - * @(#)os-fpx4.h 5.1 (Berkeley) %G% + * @(#)os-fpx4.h 5.2 (Berkeley) %G% */ /* diff --git a/usr/src/usr.sbin/amd/config/os-hcx.h b/usr/src/usr.sbin/amd/config/os-hcx.h index 52aeeea48c..5e749b004b 100644 --- a/usr/src/usr.sbin/amd/config/os-hcx.h +++ b/usr/src/usr.sbin/amd/config/os-hcx.h @@ -11,21 +11,9 @@ * This code is derived from software contributed to Berkeley by * Jan-Simon Pendry at Imperial College, London. * - * Redistribution and use in source and binary forms are permitted provided - * that: (1) source distributions retain this entire copyright notice and - * comment, and (2) distributions including binaries display the following - * acknowledgement: ``This product includes software developed by the - * University of California, Berkeley and its contributors'' in the - * documentation or other materials provided with the distribution and in - * all advertising materials mentioning features or use of this software. - * Neither the name of the University nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * %sccs.include.redist.c% * - * @(#)os-hcx.h 5.1 (Berkeley) %G% + * @(#)os-hcx.h 5.2 (Berkeley) %G% * */ diff --git a/usr/src/usr.sbin/amd/config/os-hlh42.h b/usr/src/usr.sbin/amd/config/os-hlh42.h index 1b415edd34..283e3faf3c 100644 --- a/usr/src/usr.sbin/amd/config/os-hlh42.h +++ b/usr/src/usr.sbin/amd/config/os-hlh42.h @@ -1,4 +1,4 @@ -/* $Id: os-hlh42.h,v 5.2 90/06/23 22:20:46 jsp Rel $ */ +/* $Id: os-hlh42.h,v 5.2.1.2 90/11/04 23:17:40 jsp Exp $ */ /* * HLH OTS definitions for Amd (automounter) @@ -13,7 +13,7 @@ * * %sccs.include.redist.c% * - * @(#)os-hlh42.h 5.1 (Berkeley) %G% + * @(#)os-hlh42.h 5.2 (Berkeley) %G% */ /* @@ -59,4 +59,5 @@ /* * HLH's 4.2 needs the extra RPC definitions. */ -#define MISC_RPC +#define NEED_XDR_POINTER +#define NEED_CLNT_SPERRNO diff --git a/usr/src/usr.sbin/amd/config/os-hpux.h b/usr/src/usr.sbin/amd/config/os-hpux.h index c2c455fb37..fe3f15290d 100644 --- a/usr/src/usr.sbin/amd/config/os-hpux.h +++ b/usr/src/usr.sbin/amd/config/os-hpux.h @@ -1,4 +1,4 @@ -/* $Id: os-hpux.h,v 5.2 90/06/23 22:20:47 jsp Rel $ */ +/* $Id: os-hpux.h,v 5.2.1.4 91/03/03 20:49:43 jsp Alpha $ */ /* * HP/9000 HP-UX definitions for Amd (automounter) @@ -13,7 +13,7 @@ * * %sccs.include.redist.c% * - * @(#)os-hpux.h 5.1 (Berkeley) %G% + * @(#)os-hpux.h 5.2 (Berkeley) %G% */ /* @@ -41,19 +41,20 @@ * Byte ordering */ #undef ARCH_ENDIAN -#if defined(hp9000s200) || defined(hp9000s300) +#if defined(hp9000s200) || defined(hp9000s300) || defined(hp9000s800) #define ARCH_ENDIAN "big" #endif -/* -#if defined(hp9000s800) -#define ARCH_ENDIAN "unknown" + +#ifndef __hpux +#define HPUX_VERSION_6 #endif -*/ /* - * No support for syslog() + * No support for syslog() prior to 7.0 */ +#ifdef HPUX_VERSION_6 #undef HAS_SYSLOG +#endif /* * No support for ndbm @@ -78,7 +79,7 @@ */ #undef WAIT #define WAIT "uwait.h" -#ifndef SIGCHLD +#ifdef HPUX_VERSION_6 #define SIGCHLD SIGCLD #endif #define SYS5_SIGNALS @@ -87,7 +88,8 @@ * Miscellaneous HP-UX definitions */ -#define MISC_RPC +#define NEED_XDR_POINTER +#define NEED_CLNT_SPERRNO /* * Use rather than @@ -99,9 +101,17 @@ */ #define LOCK_FCNTL -#ifdef __GNUC__ -#define alloca(sz) __builtin_alloca(sz) -#endif +/* + * Additional fields in struct mntent + * are fixed up here + */ +#define FIXUP_MNTENT(mntp) { \ + (mntp)->mnt_time = clocktime(); \ +} +#define FIXUP_MNTENT_DUP(mntp, mp) { \ + (mntp)->mnt_time = (mp)->mnt_time; \ +} + #define bzero(ptr, len) memset(ptr, 0, len) #define bcopy(from, to, len) memcpy(to, from, len) #define getpagesize() (2048) diff --git a/usr/src/usr.sbin/amd/config/os-irix.h b/usr/src/usr.sbin/amd/config/os-irix.h index 2265dff2ad..66afe92224 100644 --- a/usr/src/usr.sbin/amd/config/os-irix.h +++ b/usr/src/usr.sbin/amd/config/os-irix.h @@ -12,20 +12,9 @@ * This code is derived from software contributed to Berkeley by * Jan-Simon Pendry at Imperial College, London. * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by Imperial College of Science, Technology and Medicine, London, UK. - * The names of the College and University may not be used to endorse - * or promote products derived from this software without specific - * prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * %sccs.include.redist.c% * - * @(#)os-irix.h 5.1 (Berkeley) %G% + * @(#)os-irix.h 5.2 (Berkeley) %G% */ /* @@ -115,4 +104,5 @@ #define MOUNT_HELPER_SOURCE "mount_irix.c" #define MNTINFO_DEV "fsid" + * %sccs.include.redist.c% #define MNTINFO_PREF "0x" diff --git a/usr/src/usr.sbin/amd/config/os-next.h b/usr/src/usr.sbin/amd/config/os-next.h index 21e97ed49c..1abc7cd363 100644 --- a/usr/src/usr.sbin/amd/config/os-next.h +++ b/usr/src/usr.sbin/amd/config/os-next.h @@ -16,20 +16,9 @@ * This code is derived from software contributed to Berkeley by * Jan-Simon Pendry at Imperial College, London. * - * Redistribution and use in source and binary forms are permitted - * provided that the above copyright notice and this paragraph are - * duplicated in all such forms and that any documentation, - * advertising materials, and other materials related to such - * distribution and use acknowledge that the software was developed - * by Imperial College of Science, Technology and Medicine, London, UK. - * The names of the College and University may not be used to endorse - * or promote products derived from this software without specific - * prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * %sccs.include.redist.c% * - * @(#)os-next.h 5.1 (Berkeley) %G% + * @(#)os-next.h 5.2 (Berkeley) %G% */ /* @@ -62,4 +51,5 @@ /* * Where to get NFS definitions */ + * %sccs.include.redist.c% #define NFS_HDR "misc-next.h" diff --git a/usr/src/usr.sbin/amd/config/os-pyrOSx.h b/usr/src/usr.sbin/amd/config/os-pyrOSx.h index 4fba5e072a..4f6981980a 100644 --- a/usr/src/usr.sbin/amd/config/os-pyrOSx.h +++ b/usr/src/usr.sbin/amd/config/os-pyrOSx.h @@ -1,4 +1,4 @@ -/* $Id: os-pyrOSx.h,v 5.2 90/06/23 22:20:50 jsp Rel $ */ +/* $Id: os-pyrOSx.h,v 5.2.1.1 90/10/21 22:31:02 jsp Exp $ */ /* * Pyramid OSx definitions for Amd (automounter) @@ -14,7 +14,7 @@ * * %sccs.include.redist.c% * - * @(#)os-pyrOSx.h 5.1 (Berkeley) %G% + * @(#)os-pyrOSx.h 5.2 (Berkeley) %G% */ /* @@ -39,6 +39,7 @@ /* * Byte ordering */ +#undef ARCH_ENDIAN #define ARCH_ENDIAN "big" /* diff --git a/usr/src/usr.sbin/amd/config/os-riscix.h b/usr/src/usr.sbin/amd/config/os-riscix.h index 354b5645ca..d4ae33455c 100644 --- a/usr/src/usr.sbin/amd/config/os-riscix.h +++ b/usr/src/usr.sbin/amd/config/os-riscix.h @@ -1,4 +1,4 @@ -/* $Id: os-riscix.h,v 5.2 90/06/23 22:20:51 jsp Rel $ */ +/* $Id: os-riscix.h,v 5.2.1.1 90/10/21 22:31:03 jsp Exp $ */ /* * Acorn Archimedes RISC iX definitions for Amd (automounter) @@ -14,7 +14,7 @@ * * %sccs.include.redist.c% * - * @(#)os-riscix.h 5.1 (Berkeley) %G% + * @(#)os-riscix.h 5.2 (Berkeley) %G% */ /* diff --git a/usr/src/usr.sbin/amd/config/os-sos3.h b/usr/src/usr.sbin/amd/config/os-sos3.h index 02f704b51b..9b7a99d38d 100644 --- a/usr/src/usr.sbin/amd/config/os-sos3.h +++ b/usr/src/usr.sbin/amd/config/os-sos3.h @@ -1,4 +1,4 @@ -/* $Id: os-sos3.h,v 5.2 90/06/23 22:20:51 jsp Rel $ */ +/* $Id: os-sos3.h,v 5.2.1.1 90/10/21 22:31:04 jsp Exp $ */ /* * SunOS 3.2 definitions for Amd (automounter) @@ -13,7 +13,7 @@ * * %sccs.include.redist.c% * - * @(#)os-sos3.h 5.1 (Berkeley) %G% + * @(#)os-sos3.h 5.2 (Berkeley) %G% */ /* diff --git a/usr/src/usr.sbin/amd/config/os-sos4.h b/usr/src/usr.sbin/amd/config/os-sos4.h index 42a4a406c6..5e0d88498c 100644 --- a/usr/src/usr.sbin/amd/config/os-sos4.h +++ b/usr/src/usr.sbin/amd/config/os-sos4.h @@ -1,4 +1,4 @@ -/* $Id: os-sos4.h,v 5.2 90/06/23 22:20:52 jsp Rel $ */ +/* $Id: os-sos4.h,v 5.2.1.2 91/03/03 20:50:41 jsp Alpha $ */ /* * SunOS 4.0 definitions for Amd (automounter) @@ -13,7 +13,7 @@ * * %sccs.include.redist.c% * - * @(#)os-sos4.h 5.1 (Berkeley) %G% + * @(#)os-sos4.h 5.2 (Berkeley) %G% */ /* @@ -79,3 +79,12 @@ * Add support for SunOS 4 automounter files */ #define SUNOS4_COMPAT + +/* + * System Vr4 / SunOS 4.1 compatibility + * - put dev= in the options list + * + * From: Brent Callaghan + */ +#define MNTINFO_DEV "dev" +#define MNTINFO_PREF "" diff --git a/usr/src/usr.sbin/amd/config/os-type b/usr/src/usr.sbin/amd/config/os-type index 012017ec5d..c50c09fa63 100644 --- a/usr/src/usr.sbin/amd/config/os-type +++ b/usr/src/usr.sbin/amd/config/os-type @@ -1,6 +1,6 @@ #!/bin/sh # -# $Id: os-type,v 5.2 90/06/23 22:21:23 jsp Rel $ +# $Id: os-type,v 5.2.1.3 91/03/03 20:53:30 jsp Alpha $ # # Copyright (c) 1989 Jan-Simon Pendry # Copyright (c) 1989 Imperial College of Science, Technology & Medicine @@ -10,15 +10,15 @@ # This code is derived from software contributed to Berkeley by # Jan-Simon Pendry at Imperial College, London. # -# %sccs.include.redist.sh% +# %sccs include.redist.sh% # -# @(#)os-type 5.1 (Berkeley) %G% +# @(#)os-type 5.2 (Berkeley) %G% # # # Take a pot-shot at your os type # -echo " ... No OS= option specified; dynamically determining OS type" >&2 +echo "# ... No OS= option specified; dynamically determining OS type" >&2 # # First try poking around in /etc/motd @@ -28,13 +28,17 @@ case "`exec 2>/dev/null; head -2 /etc/motd`" in *"Sun UNIX 4.2 Release 3."*) OS=sos3;; *"SunOS Release 4."*) OS=sos4;; *"HP-UX on the HP"*) OS=hpux;; +*"Iris"*) OS=irix;; *"Ultrix V2."*) OS=u2_2;; *"Ultrix-32 V3."*) OS=u3_0;; -*"Ultrix Worksystem V2.0"*) OS=u3_0;; +*"Ultrix Worksystem V2."*) OS=u3_0;; +*"ULTRIX V4."*) OS=u4_0;; *"HLH OTS Version 1."*) OS=hlh42;; *"RISC iX release 1."*) OS=riscix;; *"FPX 4."*) OS=fpx4;; +*"HCX/UX"*) OS=hcx;; *"4.4 BSD UNIX"*) OS=bsd44;; +*"4.3 BSD Reno UNIX"*) OS=bsd44;; *"4.3 BSD UNIX"*) if [ -f /etc/minidisk ]; then OS=acis43 elif [ -f /sbin/nfsiod ]; then @@ -49,14 +53,16 @@ case "`exec 2>/dev/null; head -2 /etc/motd`" in # Well, that didn't work so apply some heuristics # to the filesystem name space... # - echo " ... inspecting File system ..." >&2 - if [ -f /usr/bin/cat ]; then + echo "# ... inspecting File system ..." >&2 + if [ -f /etc/comply ]; then + OS=utek + elif [ -f /usr/bin/cat ]; then OS=sos4 elif [ -f /etc/nd ]; then OS=sos3 elif [ -f /etc/elcsd ]; then - echo " ... Ultrix - assuming U3.0 ..." >&2 - OS=u3_0 + echo "# ... Ultrix - assuming U4.0 ..." >&2 + OS=u4_0 elif [ -f /hp-ux ]; then OS=hpux elif [ -f /etc/ttylocal ]; then @@ -73,15 +79,21 @@ case "`exec 2>/dev/null; head -2 /etc/motd`" in OS=aix3 elif [ -f /bin/pyr ] && /bin/pyr; then OS=pyrOSx + elif [ -d /NextApps ]; then + OS=next + elif [ -f /usr/lib/libgl.a ]; then + OS=irix else - case "`(sh arch)2>/dev/null`" in + case "`(sh ../config/arch)2>/dev/null`" in powernode) OS=utx32;; ibm032) OS=acis43;; + aviion) OS=dgux;; *) OS=unknown;; esac fi;; esac -echo " ... OS appears to be \"${OS}\"" >&2 +echo "# ... OS appears to be \"${OS}\"" >&2 echo "${OS}" + * %sccs.include.redist.sh% exit 0 diff --git a/usr/src/usr.sbin/amd/config/os-u2_2.h b/usr/src/usr.sbin/amd/config/os-u2_2.h index d43e5d893e..2218c6ec33 100644 --- a/usr/src/usr.sbin/amd/config/os-u2_2.h +++ b/usr/src/usr.sbin/amd/config/os-u2_2.h @@ -1,4 +1,4 @@ -/* $Id: os-u2_2.h,v 5.2 90/06/23 22:20:55 jsp Rel $ */ +/* $Id: os-u2_2.h,v 5.2.1.2 90/11/04 23:17:43 jsp Exp $ */ /* * Ultrix 2.2 definitions for Amd (automounter) @@ -13,7 +13,7 @@ * * %sccs.include.redist.c% * - * @(#)os-u2_2.h 5.1 (Berkeley) %G% + * @(#)os-u2_2.h 5.2 (Berkeley) %G% */ /* @@ -116,7 +116,8 @@ struct mntent { #define NFS_HDR "misc-ultrix.h" #define UFS_HDR "misc-ultrix.h" -#define MISC_RPC +#define NEED_XDR_POINTER +#define NEED_CLNT_SPERRNO #define nfs_args nfs_gfs_mount #define ULTRIX_HACK /* Should be handled better than this !! */ diff --git a/usr/src/usr.sbin/amd/config/os-u3_0.h b/usr/src/usr.sbin/amd/config/os-u3_0.h index 5f8626ac86..eaba980fb7 100644 --- a/usr/src/usr.sbin/amd/config/os-u3_0.h +++ b/usr/src/usr.sbin/amd/config/os-u3_0.h @@ -1,4 +1,4 @@ -/* $Id: os-u3_0.h,v 5.2 90/06/23 22:20:58 jsp Rel $ */ +/* $Id: os-u3_0.h,v 5.2.1.2 90/11/04 23:17:44 jsp Exp $ */ /* * Ultrix 3.0 definitions for Amd (automounter) @@ -13,7 +13,7 @@ * * %sccs.include.redist.c% * - * @(#)os-u3_0.h 5.1 (Berkeley) %G% + * @(#)os-u3_0.h 5.2 (Berkeley) %G% */ /* @@ -109,7 +109,8 @@ struct mntent { #define NFS_HDR "misc-ultrix.h" #define UFS_HDR "misc-ultrix.h" -#define MISC_RPC +#define NEED_XDR_POINTER +#define NEED_CLNT_SPERRNO #define nfs_args nfs_gfs_mount #define ULTRIX_HACK /* Should be handled better than this !! */ diff --git a/usr/src/usr.sbin/amd/config/os-u4_0.h b/usr/src/usr.sbin/amd/config/os-u4_0.h index 96a9e6afaf..cb2f19bfe0 100644 --- a/usr/src/usr.sbin/amd/config/os-u4_0.h +++ b/usr/src/usr.sbin/amd/config/os-u4_0.h @@ -12,21 +12,9 @@ * This code is derived from software contributed to Berkeley by * Jan-Simon Pendry at Imperial College, London. * - * Redistribution and use in source and binary forms are permitted provided - * that: (1) source distributions retain this entire copyright notice and - * comment, and (2) distributions including binaries display the following - * acknowledgement: ``This product includes software developed by the - * University of California, Berkeley and its contributors'' in the - * documentation or other materials provided with the distribution and in - * all advertising materials mentioning features or use of this software. - * Neither the name of the University nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * %sccs.include.redist.c% * - * @(#)os-u4_0.h 5.1 (Berkeley) %G% + * @(#)os-u4_0.h 5.2 (Berkeley) %G% */ /* diff --git a/usr/src/usr.sbin/amd/config/os-umax43.h b/usr/src/usr.sbin/amd/config/os-umax43.h index b4a6ffc01b..9fb2c15006 100644 --- a/usr/src/usr.sbin/amd/config/os-umax43.h +++ b/usr/src/usr.sbin/amd/config/os-umax43.h @@ -1,4 +1,4 @@ -/* $Id: os-umax43.h,v 5.2 90/06/23 22:20:59 jsp Rel $ */ +/* $Id: os-umax43.h,v 5.2.1.1 90/10/21 22:31:10 jsp Exp $ */ /* * UMAX 4.3 definitions for Amd (automounter) @@ -13,7 +13,7 @@ * * %sccs.include.redist.c% * - * @(#)os-umax43.h 5.1 (Berkeley) %G% + * @(#)os-umax43.h 5.2 (Berkeley) %G% */ /* diff --git a/usr/src/usr.sbin/amd/config/os-utek.h b/usr/src/usr.sbin/amd/config/os-utek.h index 70457f56a0..ca4de33863 100644 --- a/usr/src/usr.sbin/amd/config/os-utek.h +++ b/usr/src/usr.sbin/amd/config/os-utek.h @@ -12,21 +12,9 @@ * This code is derived from software contributed to Berkeley by * Jan-Simon Pendry at Imperial College, London. * - * Redistribution and use in source and binary forms are permitted provided - * that: (1) source distributions retain this entire copyright notice and - * comment, and (2) distributions including binaries display the following - * acknowledgement: ``This product includes software developed by the - * University of California, Berkeley and its contributors'' in the - * documentation or other materials provided with the distribution and in - * all advertising materials mentioning features or use of this software. - * Neither the name of the University nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * %sccs.include.redist.c% * - * @(#)os-utek.h 5.1 (Berkeley) %G% + * @(#)os-utek.h 5.2 (Berkeley) %G% */ #define UTEK diff --git a/usr/src/usr.sbin/amd/config/os-utx32.h b/usr/src/usr.sbin/amd/config/os-utx32.h index aaaf7a0ddd..ad9e57b67f 100644 --- a/usr/src/usr.sbin/amd/config/os-utx32.h +++ b/usr/src/usr.sbin/amd/config/os-utx32.h @@ -1,4 +1,4 @@ -/* $Id: os-utx32.h,v 5.2 90/06/23 22:21:00 jsp Rel $ */ +/* $Id: os-utx32.h,v 5.2.1.1 90/10/21 22:31:11 jsp Exp $ */ /* * Gould UTX/32 definitions for Amd (automounter) @@ -13,7 +13,7 @@ * * %sccs.include.redist.c% * - * @(#)os-utx32.h 5.1 (Berkeley) %G% + * @(#)os-utx32.h 5.2 (Berkeley) %G% */ /* diff --git a/usr/src/usr.sbin/amd/config/os-xinu43.h b/usr/src/usr.sbin/amd/config/os-xinu43.h index 819555bccc..420c9847de 100644 --- a/usr/src/usr.sbin/amd/config/os-xinu43.h +++ b/usr/src/usr.sbin/amd/config/os-xinu43.h @@ -1,4 +1,4 @@ -/* $Id: os-xinu43.h,v 5.2 90/06/23 22:21:01 jsp Rel $ */ +/* $Id: os-xinu43.h,v 5.2.1.2 90/11/04 23:17:45 jsp Exp $ */ /* * mt Xinu 4.3 (MORE/bsd) definitions for Amd (automounter) @@ -14,13 +14,15 @@ * * %sccs.include.redist.c% * - * @(#)os-xinu43.h 5.1 (Berkeley) %G% + * @(#)os-xinu43.h 5.2 (Berkeley) %G% */ /* * Does the compiler grok void * */ +#ifdef __GNUC__ #define VOIDP +#endif /* * Which version of the Sun RPC library we are using diff --git a/usr/src/usr.sbin/amd/doc/Makefile b/usr/src/usr.sbin/amd/doc/Makefile index 5f20b984c6..efa211ae23 100644 --- a/usr/src/usr.sbin/amd/doc/Makefile +++ b/usr/src/usr.sbin/amd/doc/Makefile @@ -11,15 +11,17 @@ # # %sccs.include.redist.sh% # -# @(#)Makefile 5.1 (Berkeley) %G% +# @(#)Makefile 5.2 (Berkeley) %G% # -MKARG = -f ../Makefile.top PROG=doc -SHELL = /bin/sh +PROG = amdref +SRCS = amdref.texinfo -doc: FRC - @${MAKE} ${MKARG} $@ +${PROG}: amdref.dvi -install count clean lint: +amdref.dvi: ${SRCS} + -tex amdref; tex amdref -FRC: +clean: + -rm -f amdref.aux amdref.cp amdref.dvi amdref.fn amdref.ky \ + amdref.log amdref.pg amdref.toc amdref.tp amdref.vr diff --git a/usr/src/usr.sbin/amd/fsinfo/fsi_analyze.c b/usr/src/usr.sbin/amd/fsinfo/fsi_analyze.c index a789f75cfe..381381a6cd 100644 --- a/usr/src/usr.sbin/amd/fsinfo/fsi_analyze.c +++ b/usr/src/usr.sbin/amd/fsinfo/fsi_analyze.c @@ -9,21 +9,9 @@ * This code is derived from software contributed to Berkeley by * Jan-Simon Pendry at Imperial College, London. * - * Redistribution and use in source and binary forms are permitted provided - * that: (1) source distributions retain this entire copyright notice and - * comment, and (2) distributions including binaries display the following - * acknowledgement: ``This product includes software developed by the - * University of California, Berkeley and its contributors'' in the - * documentation or other materials provided with the distribution and in - * all advertising materials mentioning features or use of this software. - * Neither the name of the University nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * %sccs.include.redist.c% * - * @(#)fsi_analyze.c 5.1 (Berkeley) %G% + * @(#)fsi_analyze.c 5.2 (Berkeley) %G% * */ diff --git a/usr/src/usr.sbin/amd/fsinfo/fsi_data.h b/usr/src/usr.sbin/amd/fsinfo/fsi_data.h index a689110352..33942b1b24 100644 --- a/usr/src/usr.sbin/amd/fsinfo/fsi_data.h +++ b/usr/src/usr.sbin/amd/fsinfo/fsi_data.h @@ -9,21 +9,9 @@ * This code is derived from software contributed to Berkeley by * Jan-Simon Pendry at Imperial College, London. * - * Redistribution and use in source and binary forms are permitted provided - * that: (1) source distributions retain this entire copyright notice and - * comment, and (2) distributions including binaries display the following - * acknowledgement: ``This product includes software developed by the - * University of California, Berkeley and its contributors'' in the - * documentation or other materials provided with the distribution and in - * all advertising materials mentioning features or use of this software. - * Neither the name of the University nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * %sccs.include.redist.c% * - * @(#)fsi_data.h 5.1 (Berkeley) %G% + * @(#)fsi_data.h 5.2 (Berkeley) %G% */ typedef struct auto_tree auto_tree; diff --git a/usr/src/usr.sbin/amd/fsinfo/fsi_dict.c b/usr/src/usr.sbin/amd/fsinfo/fsi_dict.c index 5294d29da6..d85194aaf3 100644 --- a/usr/src/usr.sbin/amd/fsinfo/fsi_dict.c +++ b/usr/src/usr.sbin/amd/fsinfo/fsi_dict.c @@ -9,21 +9,9 @@ * This code is derived from software contributed to Berkeley by * Jan-Simon Pendry at Imperial College, London. * - * Redistribution and use in source and binary forms are permitted provided - * that: (1) source distributions retain this entire copyright notice and - * comment, and (2) distributions including binaries display the following - * acknowledgement: ``This product includes software developed by the - * University of California, Berkeley and its contributors'' in the - * documentation or other materials provided with the distribution and in - * all advertising materials mentioning features or use of this software. - * Neither the name of the University nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * %sccs.include.redist.c% * - * @(#)fsi_dict.c 5.1 (Berkeley) %G% + * @(#)fsi_dict.c 5.2 (Berkeley) %G% */ /* diff --git a/usr/src/usr.sbin/amd/fsinfo/fsi_gram.y b/usr/src/usr.sbin/amd/fsinfo/fsi_gram.y index 98769d5d51..3e8fa2a2f5 100644 --- a/usr/src/usr.sbin/amd/fsinfo/fsi_gram.y +++ b/usr/src/usr.sbin/amd/fsinfo/fsi_gram.y @@ -9,21 +9,9 @@ * This code is derived from software contributed to Berkeley by * Jan-Simon Pendry at Imperial College, London. * - * Redistribution and use in source and binary forms are permitted provided - * that: (1) source distributions retain this entire copyright notice and - * comment, and (2) distributions including binaries display the following - * acknowledgement: ``This product includes software developed by the - * University of California, Berkeley and its contributors'' in the - * documentation or other materials provided with the distribution and in - * all advertising materials mentioning features or use of this software. - * Neither the name of the University nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * %sccs.include.redist.c% * - * @(#)fsi_gram.y 5.1 (Berkeley) %G% + * @(#)fsi_gram.y 5.2 (Berkeley) %G% */ %{ diff --git a/usr/src/usr.sbin/amd/fsinfo/fsi_lex.l b/usr/src/usr.sbin/amd/fsinfo/fsi_lex.l index f521c69fd0..cb1d0d7cfc 100644 --- a/usr/src/usr.sbin/amd/fsinfo/fsi_lex.l +++ b/usr/src/usr.sbin/amd/fsinfo/fsi_lex.l @@ -10,21 +10,9 @@ * This code is derived from software contributed to Berkeley by * Jan-Simon Pendry at Imperial College, London. * - * Redistribution and use in source and binary forms are permitted provided - * that: (1) source distributions retain this entire copyright notice and - * comment, and (2) distributions including binaries display the following - * acknowledgement: ``This product includes software developed by the - * University of California, Berkeley and its contributors'' in the - * documentation or other materials provided with the distribution and in - * all advertising materials mentioning features or use of this software. - * Neither the name of the University nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * %sccs.include.redist.c% * - * @(#)fsi_lex.l 5.1 (Berkeley) %G% + * @(#)fsi_lex.l 5.2 (Berkeley) %G% */ /* diff --git a/usr/src/usr.sbin/amd/fsinfo/fsi_util.c b/usr/src/usr.sbin/amd/fsinfo/fsi_util.c index ef04647222..0900e9d20d 100644 --- a/usr/src/usr.sbin/amd/fsinfo/fsi_util.c +++ b/usr/src/usr.sbin/amd/fsinfo/fsi_util.c @@ -6,21 +6,9 @@ * Copyright (c) 1989 The Regents of the University of California. * All rights reserved. * - * Redistribution and use in source and binary forms are permitted provided - * that: (1) source distributions retain this entire copyright notice and - * comment, and (2) distributions including binaries display the following - * acknowledgement: ``This product includes software developed by the - * University of California, Berkeley and its contributors'' in the - * documentation or other materials provided with the distribution and in - * all advertising materials mentioning features or use of this software. - * Neither the name of the University nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * %sccs.include.redist.c% * - * @(#)fsi_util.c 5.1 (Berkeley) %G% + * @(#)fsi_util.c 5.2 (Berkeley) %G% */ #include "../fsinfo/fsinfo.h" diff --git a/usr/src/usr.sbin/amd/fsinfo/fsinfo.c b/usr/src/usr.sbin/amd/fsinfo/fsinfo.c index 058a6bc5e0..40fbea0a92 100644 --- a/usr/src/usr.sbin/amd/fsinfo/fsinfo.c +++ b/usr/src/usr.sbin/amd/fsinfo/fsinfo.c @@ -9,21 +9,9 @@ * This code is derived from software contributed to Berkeley by * Jan-Simon Pendry at Imperial College, London. * - * Redistribution and use in source and binary forms are permitted provided - * that: (1) source distributions retain this entire copyright notice and - * comment, and (2) distributions including binaries display the following - * acknowledgement: ``This product includes software developed by the - * University of California, Berkeley and its contributors'' in the - * documentation or other materials provided with the distribution and in - * all advertising materials mentioning features or use of this software. - * Neither the name of the University nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * %sccs.include.redist.c% * - * @(#)fsinfo.c 5.1 (Berkeley) %G% + * @(#)fsinfo.c 5.2 (Berkeley) %G% */ /* diff --git a/usr/src/usr.sbin/amd/fsinfo/fsinfo.h b/usr/src/usr.sbin/amd/fsinfo/fsinfo.h index 67e5be75fd..9d1bb7c3ee 100644 --- a/usr/src/usr.sbin/amd/fsinfo/fsinfo.h +++ b/usr/src/usr.sbin/amd/fsinfo/fsinfo.h @@ -9,21 +9,9 @@ * This code is derived from software contributed to Berkeley by * Jan-Simon Pendry at Imperial College, London. * - * Redistribution and use in source and binary forms are permitted provided - * that: (1) source distributions retain this entire copyright notice and - * comment, and (2) distributions including binaries display the following - * acknowledgement: ``This product includes software developed by the - * University of California, Berkeley and its contributors'' in the - * documentation or other materials provided with the distribution and in - * all advertising materials mentioning features or use of this software. - * Neither the name of the University nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * %sccs.include.redist.c% * - * @(#)fsinfo.h 5.1 (Berkeley) %G% + * @(#)fsinfo.h 5.2 (Berkeley) %G% */ /* diff --git a/usr/src/usr.sbin/amd/fsinfo/wr_atab.c b/usr/src/usr.sbin/amd/fsinfo/wr_atab.c index 00df70fbee..5f1bbdfaf8 100644 --- a/usr/src/usr.sbin/amd/fsinfo/wr_atab.c +++ b/usr/src/usr.sbin/amd/fsinfo/wr_atab.c @@ -9,21 +9,9 @@ * This code is derived from software contributed to Berkeley by * Jan-Simon Pendry at Imperial College, London. * - * Redistribution and use in source and binary forms are permitted provided - * that: (1) source distributions retain this entire copyright notice and - * comment, and (2) distributions including binaries display the following - * acknowledgement: ``This product includes software developed by the - * University of California, Berkeley and its contributors'' in the - * documentation or other materials provided with the distribution and in - * all advertising materials mentioning features or use of this software. - * Neither the name of the University nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * %sccs.include.redist.c% * - * @(#)wr_atab.c 5.1 (Berkeley) %G% + * @(#)wr_atab.c 5.2 (Berkeley) %G% */ #include "../fsinfo/fsinfo.h" diff --git a/usr/src/usr.sbin/amd/fsinfo/wr_bparam.c b/usr/src/usr.sbin/amd/fsinfo/wr_bparam.c index 2e78b41c7b..410717bcbd 100644 --- a/usr/src/usr.sbin/amd/fsinfo/wr_bparam.c +++ b/usr/src/usr.sbin/amd/fsinfo/wr_bparam.c @@ -9,21 +9,9 @@ * This code is derived from software contributed to Berkeley by * Jan-Simon Pendry at Imperial College, London. * - * Redistribution and use in source and binary forms are permitted provided - * that: (1) source distributions retain this entire copyright notice and - * comment, and (2) distributions including binaries display the following - * acknowledgement: ``This product includes software developed by the - * University of California, Berkeley and its contributors'' in the - * documentation or other materials provided with the distribution and in - * all advertising materials mentioning features or use of this software. - * Neither the name of the University nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * %sccs.include.redist.c% * - * @(#)wr_bparam.c 5.1 (Berkeley) %G% + * @(#)wr_bparam.c 5.2 (Berkeley) %G% */ #include "../fsinfo/fsinfo.h" diff --git a/usr/src/usr.sbin/amd/fsinfo/wr_dumpset.c b/usr/src/usr.sbin/amd/fsinfo/wr_dumpset.c index 7913d21b4b..68cbdd6848 100644 --- a/usr/src/usr.sbin/amd/fsinfo/wr_dumpset.c +++ b/usr/src/usr.sbin/amd/fsinfo/wr_dumpset.c @@ -9,21 +9,9 @@ * This code is derived from software contributed to Berkeley by * Jan-Simon Pendry at Imperial College, London. * - * Redistribution and use in source and binary forms are permitted provided - * that: (1) source distributions retain this entire copyright notice and - * comment, and (2) distributions including binaries display the following - * acknowledgement: ``This product includes software developed by the - * University of California, Berkeley and its contributors'' in the - * documentation or other materials provided with the distribution and in - * all advertising materials mentioning features or use of this software. - * Neither the name of the University nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * %sccs.include.redist.c% * - * @(#)wr_dumpset.c 5.1 (Berkeley) %G% + * @(#)wr_dumpset.c 5.2 (Berkeley) %G% */ #include "../fsinfo/fsinfo.h" diff --git a/usr/src/usr.sbin/amd/fsinfo/wr_exportfs.c b/usr/src/usr.sbin/amd/fsinfo/wr_exportfs.c index 011ae9d96f..638d3724ed 100644 --- a/usr/src/usr.sbin/amd/fsinfo/wr_exportfs.c +++ b/usr/src/usr.sbin/amd/fsinfo/wr_exportfs.c @@ -9,21 +9,9 @@ * This code is derived from software contributed to Berkeley by * Jan-Simon Pendry at Imperial College, London. * - * Redistribution and use in source and binary forms are permitted provided - * that: (1) source distributions retain this entire copyright notice and - * comment, and (2) distributions including binaries display the following - * acknowledgement: ``This product includes software developed by the - * University of California, Berkeley and its contributors'' in the - * documentation or other materials provided with the distribution and in - * all advertising materials mentioning features or use of this software. - * Neither the name of the University nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * %sccs.include.redist.c% * - * @(#)wr_exportfs.c 5.1 (Berkeley) %G% + * @(#)wr_exportfs.c 5.2 (Berkeley) %G% */ #include "../fsinfo/fsinfo.h" diff --git a/usr/src/usr.sbin/amd/fsinfo/wr_fstab.c b/usr/src/usr.sbin/amd/fsinfo/wr_fstab.c index 103ac68ff4..48a5b6e09f 100644 --- a/usr/src/usr.sbin/amd/fsinfo/wr_fstab.c +++ b/usr/src/usr.sbin/amd/fsinfo/wr_fstab.c @@ -9,21 +9,9 @@ * This code is derived from software contributed to Berkeley by * Jan-Simon Pendry at Imperial College, London. * - * Redistribution and use in source and binary forms are permitted provided - * that: (1) source distributions retain this entire copyright notice and - * comment, and (2) distributions including binaries display the following - * acknowledgement: ``This product includes software developed by the - * University of California, Berkeley and its contributors'' in the - * documentation or other materials provided with the distribution and in - * all advertising materials mentioning features or use of this software. - * Neither the name of the University nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * %sccs.include.redist.c% * - * @(#)wr_fstab.c 5.1 (Berkeley) %G% + * @(#)wr_fstab.c 5.2 (Berkeley) %G% */ #include "../fsinfo/fsinfo.h" diff --git a/usr/src/usr.sbin/amd/mk-amd-map/Makefile b/usr/src/usr.sbin/amd/mk-amd-map/Makefile index bd5f77838f..79c75e46d9 100644 --- a/usr/src/usr.sbin/amd/mk-amd-map/Makefile +++ b/usr/src/usr.sbin/amd/mk-amd-map/Makefile @@ -1,4 +1,4 @@ -# @(#)Makefile 5.2 (Berkeley) %G% +# @(#)Makefile 5.3 (Berkeley) %G% PROG= mk-amd-map NOMAN= true diff --git a/usr/src/usr.sbin/amd/mk-amd-map/mk-amd-map.c b/usr/src/usr.sbin/amd/mk-amd-map/mk-amd-map.c index 08c6a353c6..184fbb6228 100644 --- a/usr/src/usr.sbin/amd/mk-amd-map/mk-amd-map.c +++ b/usr/src/usr.sbin/amd/mk-amd-map/mk-amd-map.c @@ -1,5 +1,5 @@ /* - * $Id: mk-amd-map.c,v 5.2 90/06/23 22:20:10 jsp Rel $ + * $Id: mk-amd-map.c,v 5.2.1.2 91/03/17 17:37:27 jsp Alpha $ * * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine @@ -11,7 +11,7 @@ * * %sccs.include.redist.c% * - * @(#)mk-amd-map.c 5.2 (Berkeley) %G% + * @(#)mk-amd-map.c 5.3 (Berkeley) %G% */ /* @@ -27,21 +27,18 @@ char copyright[] = "\ #endif /* not lint */ #ifndef lint -static char rcsid[] = "$Id: mk-amd-map.c,v 5.2 90/06/23 22:20:10 jsp Rel $"; -static char sccsid[] = "@(#)mk-amd-map.c 5.2 (Berkeley) %G%"; +static char rcsid[] = "$Id: mk-amd-map.c,v 5.2.1.2 91/03/17 17:37:27 jsp Alpha $"; +static char sccsid[] = "@(#)mk-amd-map.c 5.3 (Berkeley) %G%"; #endif /* not lint */ #include "am.h" -#ifdef OS_HAS_GDBM -#define HAS_DATABASE -#include "gdbm.h" -#endif /* OS_HAS_GDBM */ +#ifndef SIGINT +#include +#endif -#ifndef HAS_DATABASE #ifdef OS_HAS_NDBM #define HAS_DATABASE -#define USE_NDBM #include #define create_database(name) dbm_open(name, O_RDWR|O_CREAT, 0444) @@ -59,7 +56,6 @@ char *k, *v; } #endif /* OS_HAS_NDBM */ -#endif /* !OS_HAS_DATABASE */ #ifdef HAS_DATABASE #include @@ -164,12 +160,13 @@ voidp db; fprintf(stderr, "Can't interpolate %s\n", kp); errs++; } else if (*cp) { -#ifdef DEBUG - printf("%s\t%s\n", kp, cp); -#endif /* DEBUG */ - if (store_data(db, kp, cp) < 0) { - fprintf(stderr, "Could store %s -> %s\n", kp, cp); - errs++; + if (db) { + if (store_data(db, kp, cp) < 0) { + fprintf(stderr, "Could store %s -> %s\n", kp, cp); + errs++; + } + } else { + printf("%s\t%s\n", kp, cp); } } else { fprintf(stderr, "%s: line %d has no value field", map, line_no); @@ -191,7 +188,7 @@ again: return errs; } -static int xremove(f) +static int remove_file(f) char *f; { if (unlink(f) < 0 && errno != ENOENT) @@ -207,18 +204,32 @@ char *argv[]; char *map; int rc = 0; DBM *mapd; - static char maptmp[] = "dbmXXXXXX"; + char *maptmp = "dbmXXXXXX"; char maptpag[16], maptdir[16]; char *mappag, *mapdir; int len; char *sl; + int printit = 0; + int usage = 0; + int ch; + extern int optind; + + while ((ch = getopt(argc, argv, "p")) != EOF) + switch (ch) { + case 'p': + printit = 1; + break; + default: + usage++; + break; + } - if (argc != 2) { - fputs("Usage: mk-amd-map file-map\n", stderr); + if (usage || optind != (argc - 1)) { + fputs("Usage: mk-amd-map [-p] file-map\n", stderr); exit(1); } - map = argv[1]; + map = argv[optind]; sl = strrchr(map, '/'); if (sl) { *sl = '\0'; @@ -229,63 +240,73 @@ char *argv[]; } map = sl + 1; } -#ifdef USE_NDBM - len = strlen(map); - mappag = (char *) malloc(len + 5); - mapdir = (char *) malloc(len + 5); - if (!mappag || !mapdir) { - perror("malloc"); - exit(1); - } - mktemp(maptmp); - sprintf(maptpag, "%s.pag", maptmp); - sprintf(maptdir, "%s.dir", maptmp); - if (xremove(maptpag) < 0 || xremove(maptdir) < 0) { - fprintf(stderr, "Can't remove existing temporary files; %s and", maptpag); - perror(maptdir); - exit(1); + + if (!printit) { + len = strlen(map); + mappag = (char *) malloc(len + 5); + mapdir = (char *) malloc(len + 5); + if (!mappag || !mapdir) { + perror("mk-amd-map: malloc"); + exit(1); + } + mktemp(maptmp); + sprintf(maptpag, "%s.pag", maptmp); + sprintf(maptdir, "%s.dir", maptmp); + if (remove_file(maptpag) < 0 || remove_file(maptdir) < 0) { + fprintf(stderr, "Can't remove existing temporary files; %s and", maptpag); + perror(maptdir); + exit(1); + } } -#endif /* USE_NDBM */ + mapf = fopen(map, "r"); - if (mapf) + if (mapf && !printit) mapd = create_database(maptmp); else mapd = 0; + #ifndef DEBUG signal(SIGINT, SIG_IGN); -#endif /* DEBUG */ - if (mapd) { +#endif + + if (mapd || printit) { int error = read_file(mapf, map, mapd); (void) fclose(mapf); - if (error) { - fprintf(stderr, "Error creating ndbm map for %s\n", map); - rc = 1; - } -#ifdef USE_NDBM - sprintf(mappag, "%s.pag", map); - sprintf(mapdir, "%s.dir", map); - if (rename(maptpag, mappag) < 0) { - fprintf(stderr, "Couldn't rename %s to ", maptpag); - perror(mappag); - /* Throw away the temporary map */ - unlink(maptpag); - unlink(maptdir); - rc = 1; - } else if (rename(maptdir, mapdir) < 0) { - fprintf(stderr, "Couldn't rename %s to ", maptdir); - perror(mapdir); - /* Put the .pag file back */ - rename(mappag, maptpag); - /* Throw away remaining part of original map */ - unlink(mapdir); - fprintf(stderr, "WARNING: existing map \"%s.{dir,pag}\" destroyed\n", map); - rc = 1; + if (printit) { + if (error) { + fprintf(stderr, "Error creating ndbm map for %s\n", map); + rc = 1; + } + } else { + if (error) { + fprintf(stderr, "Error reading source file %s\n", map); + rc = 1; + } else { + sprintf(mappag, "%s.pag", map); + sprintf(mapdir, "%s.dir", map); + if (rename(maptpag, mappag) < 0) { + fprintf(stderr, "Couldn't rename %s to ", maptpag); + perror(mappag); + /* Throw away the temporary map */ + unlink(maptpag); + unlink(maptdir); + rc = 1; + } else if (rename(maptdir, mapdir) < 0) { + fprintf(stderr, "Couldn't rename %s to ", maptdir); + perror(mapdir); + /* Put the .pag file back */ + rename(mappag, maptpag); + /* Throw away remaining part of original map */ + unlink(mapdir); + fprintf(stderr, + "WARNING: existing map \"%s.{dir,pag}\" destroyed\n", + map); + rc = 1; + } + } } -#endif /* USE_NDBM */ } else { -#ifdef USE_NDBM fprintf(stderr, "Can't open \"%s.{dir,pag}\" for ", map); -#endif /* USE_NDBM */ perror("writing"); rc = 1; } @@ -294,7 +315,8 @@ char *argv[]; #else main() { - fputs("This system does not support hashed database files\n", stderr); - exit(0); + fputs("mk-amd-map: This system does not support hashed database files\n", stderr); + exit(1); } + * %sccs.include.redist.c% #endif /* HAS_DATABASE */ diff --git a/usr/src/usr.sbin/amd/rpcx/amq.h b/usr/src/usr.sbin/amd/rpcx/amq.h index f6e8a482a8..53e4156f27 100644 --- a/usr/src/usr.sbin/amd/rpcx/amq.h +++ b/usr/src/usr.sbin/amd/rpcx/amq.h @@ -1,5 +1,5 @@ /* - * $Id: amq.h,v 5.2 90/06/23 22:20:13 jsp Rel $ + * $Id: amq.h,v 5.2.1.2 91/03/17 17:39:26 jsp Alpha $ * * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine @@ -11,7 +11,7 @@ * * %sccs.include.redist.c% * - * @(#)amq.h 5.1 (Berkeley) %G% + * @(#)amq.h 5.2 (Berkeley) %G% */ #define AMQ_STRLEN 1024 @@ -119,4 +119,8 @@ extern amq_mount_tree_list *amqproc_export_1(); extern int *amqproc_setopt_1(); #define AMQPROC_GETMNTFS ((u_long)6) extern amq_mount_info_list *amqproc_getmntfs_1(); +#define AMQPROC_MOUNT ((u_long)7) +extern int *amqproc_mount_1(); +#define AMQPROC_GETVERS ((u_long)8) +extern amq_string *amqproc_getvers_1(); diff --git a/usr/src/usr.sbin/amd/rpcx/amq.x b/usr/src/usr.sbin/amd/rpcx/amq.x index 4f0f67f68e..76824dd1cd 100644 --- a/usr/src/usr.sbin/amd/rpcx/amq.x +++ b/usr/src/usr.sbin/amd/rpcx/amq.x @@ -1,5 +1,5 @@ /* - * $Id: amq.x,v 5.2 90/06/23 22:20:11 jsp Rel $ + * $Id: amq.x,v 5.2.1.2 91/03/17 17:39:36 jsp Alpha $ * * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine @@ -11,7 +11,7 @@ * * %sccs.include.redist.c% * - * @(#)amq.x 5.1 (Berkeley) %G% + * @(#)amq.x 5.2 (Berkeley) %G% */ /* @@ -142,5 +142,17 @@ program AMQ_PROGRAM { */ amq_mount_info_list AMQPROC_GETMNTFS(void) = 6; + + /* + * Mount a filesystem + */ + int + AMQPROC_MOUNT(amq_string) = 7; + + /* + * Get version info + */ + amq_string + AMQPROC_GETVERS(void) = 8; } = 1; } = 300019; /* Allocated by Sun, 89/8/29 */ diff --git a/usr/src/usr.sbin/amd/rpcx/amq_clnt.c b/usr/src/usr.sbin/amd/rpcx/amq_clnt.c index 52e3b7b890..37b76ce012 100644 --- a/usr/src/usr.sbin/amd/rpcx/amq_clnt.c +++ b/usr/src/usr.sbin/amd/rpcx/amq_clnt.c @@ -1,5 +1,5 @@ /* - * $Id: amq_clnt.c,v 5.2 90/06/23 22:20:16 jsp Rel $ + * $Id: amq_clnt.c,v 5.2.1.2 91/03/17 17:39:38 jsp Alpha $ * * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine @@ -11,14 +11,13 @@ * * %sccs.include.redist.c% * - * @(#)amq_clnt.c 5.1 (Berkeley) %G% + * @(#)amq_clnt.c 5.2 (Berkeley) %G% */ #include "am.h" #include "amq.h" -/* Default timeout can be changed using clnt_control() */ -static struct timeval TIMEOUT = { 25, 0 }; +static struct timeval TIMEOUT = { ALLOWED_MOUNT_TIME, 0 }; voidp amqproc_null_1(argp, clnt) @@ -123,3 +122,33 @@ amqproc_getmntfs_1(argp, clnt) return (&res); } + +int * +amqproc_mount_1(argp, clnt) + voidp argp; + CLIENT *clnt; +{ + static int res; + + bzero((char *)&res, sizeof(res)); + if (clnt_call(clnt, AMQPROC_MOUNT, xdr_amq_string, argp, xdr_int, &res, TIMEOUT) != RPC_SUCCESS) { + return (NULL); + } + return (&res); +} + + +amq_string * +amqproc_getvers_1(argp, clnt) + voidp argp; + CLIENT *clnt; +{ + static amq_string res; + + bzero((char *)&res, sizeof(res)); + if (clnt_call(clnt, AMQPROC_GETVERS, xdr_void, argp, xdr_amq_string, &res, TIMEOUT) != RPC_SUCCESS) { + return (NULL); + } + return (&res); +} + diff --git a/usr/src/usr.sbin/amd/rpcx/amq_svc.c b/usr/src/usr.sbin/amd/rpcx/amq_svc.c index ae4f3ffc48..0d28978120 100644 --- a/usr/src/usr.sbin/amd/rpcx/amq_svc.c +++ b/usr/src/usr.sbin/amd/rpcx/amq_svc.c @@ -1,5 +1,5 @@ /* - * $Id: amq_svc.c,v 5.2 90/06/23 22:20:17 jsp Rel $ + * $Id: amq_svc.c,v 5.2.1.2 91/03/17 17:39:38 jsp Alpha $ * * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine @@ -11,7 +11,7 @@ * * %sccs.include.redist.c% * - * @(#)amq_svc.c 5.1 (Berkeley) %G% + * @(#)amq_svc.c 5.2 (Berkeley) %G% */ #include "am.h" @@ -27,6 +27,7 @@ amq_program_1(rqstp, transp) amq_string amqproc_mnttree_1_arg; amq_string amqproc_umnt_1_arg; amq_setopt amqproc_setopt_1_arg; + amq_string amqproc_mount_1_arg; } argument; char *result; bool_t (*xdr_argument)(), (*xdr_result)(); @@ -75,6 +76,18 @@ amq_program_1(rqstp, transp) local = (char *(*)()) amqproc_getmntfs_1; break; + case AMQPROC_MOUNT: + xdr_argument = xdr_amq_string; + xdr_result = xdr_int; + local = (char *(*)()) amqproc_mount_1; + break; + + case AMQPROC_GETVERS: + xdr_argument = xdr_void; + xdr_result = xdr_amq_string; + local = (char *(*)()) amqproc_getvers_1; + break; + default: svcerr_noproc(transp); return; diff --git a/usr/src/usr.sbin/amd/rpcx/amq_xdr.c b/usr/src/usr.sbin/amd/rpcx/amq_xdr.c index 8ef019bdc7..99192ddf8f 100644 --- a/usr/src/usr.sbin/amd/rpcx/amq_xdr.c +++ b/usr/src/usr.sbin/amd/rpcx/amq_xdr.c @@ -1,5 +1,5 @@ /* - * $Id: amq_xdr.c,v 5.2 90/06/23 22:20:14 jsp Rel $ + * $Id: amq_xdr.c,v 5.2.1.1 90/10/21 22:30:16 jsp Exp $ * * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine @@ -11,7 +11,7 @@ * * %sccs.include.redist.c% * - * @(#)amq_xdr.c 5.1 (Berkeley) %G% + * @(#)amq_xdr.c 5.2 (Berkeley) %G% */ #include "am.h" diff --git a/usr/src/usr.sbin/amd/rpcx/mount.h b/usr/src/usr.sbin/amd/rpcx/mount.h index b0644247ba..6d26b1d992 100644 --- a/usr/src/usr.sbin/amd/rpcx/mount.h +++ b/usr/src/usr.sbin/amd/rpcx/mount.h @@ -1,17 +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. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Jan-Simon Pendry at Imperial College, London. - * - * %sccs.include.redist.c% - * - * @(#)mount.h 5.1 (Berkeley) %G% - */ - #define MNTPATHLEN 1024 #define MNTNAMLEN 255 #define FHSIZE 32 diff --git a/usr/src/usr.sbin/amd/rpcx/mount_xdr.c b/usr/src/usr.sbin/amd/rpcx/mount_xdr.c index 666a5e73d5..3b6bed6262 100644 --- a/usr/src/usr.sbin/amd/rpcx/mount_xdr.c +++ b/usr/src/usr.sbin/amd/rpcx/mount_xdr.c @@ -1,5 +1,5 @@ /* - * $Id: mount_xdr.c,v 5.2 90/06/23 22:20:21 jsp Rel $ + * $Id: mount_xdr.c,v 5.2.1.1 90/10/21 22:30:21 jsp Exp $ * * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine @@ -11,7 +11,7 @@ * * %sccs.include.redist.c% * - * @(#)mount_xdr.c 5.1 (Berkeley) %G% + * @(#)mount_xdr.c 5.2 (Berkeley) %G% */ #include "am.h" diff --git a/usr/src/usr.sbin/amd/rpcx/nfs_prot.h b/usr/src/usr.sbin/amd/rpcx/nfs_prot.h index 4c5ca3859d..bfe55341c1 100644 --- a/usr/src/usr.sbin/amd/rpcx/nfs_prot.h +++ b/usr/src/usr.sbin/amd/rpcx/nfs_prot.h @@ -1,18 +1,4 @@ -/* - * $Id: nfs_prot.h,v 5.2 90/06/23 22:20:24 jsp Rel $ - * - * 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. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Jan-Simon Pendry at Imperial College, London. - * - * %sccs.include.redist.c% - * - * @(#)nfs_prot.h 5.1 (Berkeley) %G% - */ +/* $Id: nfs_prot.h,v 5.2.1.1 90/10/21 22:30:23 jsp Exp $ */ #define xdr_nfsstat xdr_enum #define xdr_ftype xdr_enum diff --git a/usr/src/usr.sbin/amd/rpcx/nfs_prot_svc.c b/usr/src/usr.sbin/amd/rpcx/nfs_prot_svc.c index 897e910dc8..c5a6238f0d 100644 --- a/usr/src/usr.sbin/amd/rpcx/nfs_prot_svc.c +++ b/usr/src/usr.sbin/amd/rpcx/nfs_prot_svc.c @@ -1,5 +1,5 @@ /* - * $Id: nfs_prot_svc.c,v 5.2 90/06/23 22:20:25 jsp Rel $ + * $Id: nfs_prot_svc.c,v 5.2.1.1 90/10/21 22:30:25 jsp Exp $ * * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine @@ -11,7 +11,7 @@ * * %sccs.include.redist.c% * - * @(#)nfs_prot_svc.c 5.1 (Berkeley) %G% + * @(#)nfs_prot_svc.c 5.2 (Berkeley) %G% */ #include "am.h" diff --git a/usr/src/usr.sbin/amd/rpcx/nfs_prot_xdr.c b/usr/src/usr.sbin/amd/rpcx/nfs_prot_xdr.c index 6f9040d2c7..5dc062844b 100644 --- a/usr/src/usr.sbin/amd/rpcx/nfs_prot_xdr.c +++ b/usr/src/usr.sbin/amd/rpcx/nfs_prot_xdr.c @@ -1,5 +1,5 @@ /* - * $Id: nfs_prot_xdr.c,v 5.2 90/06/23 22:20:27 jsp Rel $ + * $Id: nfs_prot_xdr.c,v 5.2.1.1 90/10/21 22:30:26 jsp Exp $ * * Copyright (c) 1989 Jan-Simon Pendry * Copyright (c) 1989 Imperial College of Science, Technology & Medicine @@ -11,7 +11,7 @@ * * %sccs.include.redist.c% * - * @(#)nfs_prot_xdr.c 5.1 (Berkeley) %G% + * @(#)nfs_prot_xdr.c 5.2 (Berkeley) %G% */ #include "am.h" diff --git a/usr/src/usr.sbin/amd/text/INSTALL b/usr/src/usr.sbin/amd/text/INSTALL index 96f8d5a950..f1d557ec76 100644 --- a/usr/src/usr.sbin/amd/text/INSTALL +++ b/usr/src/usr.sbin/amd/text/INSTALL @@ -5,58 +5,63 @@ NOTE: Please read all of this before starting. 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). +If you don't know what an Automounter does for you then read the +documentation in doc/amdref.texinfo. You can either use TeX to print +it out or read it directly using the GNU info package. 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: +To install Amd you need a port for your version of UN*X. In the +config/ directory are several files called os-*.h. One of these +should correspond to your version of UN*X. Run the program +"config/os-type" to find out what system Amd thinks you have. Check +the correspondong config/os-??? file to make sure that you and Amd are +in agreement. If os-type returns "unknown" 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). 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 + dgux Data General AViiON 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 + irix SGI Iris + next NeXT 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 + u3_0 Ultrix 3.0/4.0 (or 3.*?) on a VAX (broken) 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 +If you do define a new operating system type foo, you may need 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. +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. + +To check whether things are working, run: + sh config/arch + sh config/os-type 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). +variables most likely to be changes are at the top. Any changes should be +added to a file called config/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 2). Additionally, some configuration options may be altered in "config/Makefile.config". This means that you should not need to edit any @@ -71,10 +76,23 @@ should check: that is fixed by -fpcc-struct-return.]] Amd contains no "register" declarations, so using old PCC based code generators is probably bad news. + To use GNU CC, add the following to config/Makefile.local{.os-type}: + + CC = gcc ${GCCOPTS} + * 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. + which will cause a running commentary to be printed to the log file. To + compile in the debug code, add the following to + config/Makefile.local{.os-type}: + + DEBUG = -DDEBUG + CCOPTS = -g + + The -g option will also allow you to use gdb. Using dbx is not advisable + since it puts a breakpoint on exit() which causes all of Amd's child + processes to dump core. gdb does not suffer from this problem. 4. ``Build the executable...'' @@ -82,13 +100,16 @@ Now you need to compile the automounter. To do this you type: make +in the top-level directory. You can also go into each of the program +directories and just run make there. + 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". +compilation is complete you will end up with a program called "A.arch_foo/amd". Try running: @@ -96,9 +117,13 @@ Try running: 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 + 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. + amd 5.2.1.5 of 90/09/16 13:22:46 5.3Alpha5 #0: Sun Sep 16 13:23:28 BST 1990 Built by pendry@okeeffe.Berkeley.EDU for a tahoe running bsd44 (big-endian) Map support for: root, passwd, nis, file, error. + fstypes: ufs, nfs, nfsx, host, link, program, auto, direct, toplvl, error. Make sure the O/S and architecture types were correctly derived during the build. @@ -109,8 +134,8 @@ 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). +to install "A.arch_foo/amd" in "/usr/local/etc/amd" (or as otherwise +modified in part 3). 6. ``Update /etc/rpc'' @@ -121,13 +146,15 @@ YP or Hesiod master: # Automount control protocol amd 300019 amq +Amd does not require this addition - it just keeps rpcinfo happy. + 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 +directory which is automounted. This will 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. @@ -141,20 +168,21 @@ 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 +for more details. The configuration file "maps/a_master" provides a sample for you to play with. Something like: - ./amd -c 40 -D test,nodaemon /tmp/amnt a_master & + ./amd -c 40 -D test,nodaemon /tmp/amnt ../maps/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 ;-) +leaving your machine in a potentially dangerous state. -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. +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 and your system's mount table is +reflected in a file. In this case watch out for NFS stepping in and +mapping root to nobody. 8. ``Report what happened...'' @@ -163,12 +191,12 @@ If anything interesting happened, eg it didn't work, please report it to me 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. +* Amd does not work correctly on a DecStation 3100 system running + Ultrix 3.1 or 4.0. This is a bug in Ultrix. This is caused by a data structure + size problem in the Ultrix kernel. Last I heard, this was still not fixed in + Ultrix 4.0. Patches are available for anonymous ftp from dip.cs.wisc.edu: + pub/nfs_subr.o-3.1 (For Ultrix 3.1 -- probably breaks with 3.1C/D) + pub/nfs_subr.o-4.0 (For Ultrix 4.0, rev 179) + Thanks to Bruce Cole for making them available. -$Id: INSTALL,v 5.2 90/06/23 22:21:31 jsp Rel $ +$Id: INSTALL,v 5.2.1.3 91/03/03 21:25:18 jsp Alpha $ diff --git a/usr/src/usr.sbin/amd/text/README b/usr/src/usr.sbin/amd/text/README index 8107abb1d2..695a09d30c 100644 --- a/usr/src/usr.sbin/amd/text/README +++ b/usr/src/usr.sbin/amd/text/README @@ -4,26 +4,34 @@ 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. +The version you have here is release 5.3Alpha. 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++), +Sun-4's (SunOS 4.0, 4.1), HP-9000/300 (HP-UX, MORE/bsd & BSD 4.3 Reno), 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 +MORE/bsd & BSD 4.3 Reno) and a wide 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. + +This is the file text/README. + +See the file text/INSTALL for installation instructions. + +The documentation is in doc/amdref.texinfo. This is in GNU TeXinfo format +and you will need a TeX system before you can print it out. Please forward *all* bug reports to Jan-Simon Pendry quoting the details of the release and your configuration, which can be -obtained by running the command "amd -v". Thanks. +obtained by running the command "amd -v". Also send any additional +information which may be relevant such as command line options and the maps +being used. 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. +texinfo document doc/amdref.texinfo for a more detailed discussion. -$Id: README,v 5.2 90/06/23 22:21:33 jsp Rel $ +$Id: README,v 5.2.1.3 91/03/03 21:24:58 jsp Alpha $ diff --git a/usr/src/usr.sbin/amd/text/amd.start.ex b/usr/src/usr.sbin/amd/text/amd.start.ex index f1d892568b..fada06a44e 100644 --- a/usr/src/usr.sbin/amd/text/amd.start.ex +++ b/usr/src/usr.sbin/amd/text/amd.start.ex @@ -2,7 +2,7 @@ # # Start amd # -# $Id: amd.start.ex,v 5.2 90/06/23 22:21:29 jsp Rel $ +# $Id: amd.start.ex,v 5.2.1.1 90/10/21 22:31:39 jsp Exp $ # # Copyright (c) 1989 Jan-Simon Pendry # Copyright (c) 1989 Imperial College of Science, Technology & Medicine @@ -14,7 +14,7 @@ # # %sccs.include.redist.sh% # -# @(#)amd.start.ex 5.1 (Berkeley) %G% +# @(#)amd.start.ex 5.2 (Berkeley) %G% # PATH=/usr/local/etc:/bin:/usr/bin:/usr/ucb:$PATH export PATH -- 2.20.1