summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>1999-11-05 11:42:30 +0000
committerobrien <obrien@FreeBSD.org>1999-11-05 11:42:30 +0000
commitaf59541d88274a855749824b48db3943f4e68c34 (patch)
treed1487de1e4fe4eeecee0ace0bdefeaba6ec28996
parent525520fd05daace78c0d8621f082ede8a143247a (diff)
downloadFreeBSD-src-af59541d88274a855749824b48db3943f4e68c34.zip
FreeBSD-src-af59541d88274a855749824b48db3943f4e68c34.tar.gz
Virgin import of AMD (am-utils) v6.0.3s1
-rw-r--r--contrib/amd/AUTHORS7
-rw-r--r--contrib/amd/BUGS17
-rw-r--r--contrib/amd/ChangeLog129
-rw-r--r--contrib/amd/INSTALL1
-rw-r--r--contrib/amd/NEWS26
-rw-r--r--contrib/amd/amd/amd.819
-rw-r--r--contrib/amd/amd/amd.c18
-rw-r--r--contrib/amd/amd/amd.h9
-rw-r--r--contrib/amd/amd/amfs_auto.c117
-rw-r--r--contrib/amd/amd/amfs_program.c4
-rw-r--r--contrib/amd/amd/conf.c22
-rw-r--r--contrib/amd/amd/get_args.c4
-rw-r--r--contrib/amd/amd/info_ldap.c5
-rw-r--r--contrib/amd/amd/mapc.c78
-rw-r--r--contrib/amd/amd/opts.c6
-rw-r--r--contrib/amd/doc/am-utils.texi185
-rw-r--r--contrib/amd/doc/stamp-vti6
-rw-r--r--contrib/amd/doc/version.texi6
-rw-r--r--contrib/amd/fsinfo/fsi_lex.l6
-rw-r--r--contrib/amd/include/am_defs.h5
-rw-r--r--contrib/amd/libamu/xutil.c3
-rw-r--r--contrib/amd/scripts/amd.conf-sample5
-rw-r--r--contrib/amd/scripts/amd.conf.564
-rw-r--r--contrib/amd/tasks17
24 files changed, 578 insertions, 181 deletions
diff --git a/contrib/amd/AUTHORS b/contrib/amd/AUTHORS
index c6b61ee..2618766 100644
--- a/contrib/amd/AUTHORS
+++ b/contrib/amd/AUTHORS
@@ -255,6 +255,9 @@ March 26, 1999: ensure lostaltmail displays Y2K compliant dates.
* Jon Peatfield <J.S.Peatfield@damtp.cam.ac.uk>
March 30, 1999: turn off incomplete NFS V.3 support in HPUX 10.20.
+September 22, 1999: safe reloading of maps without first clearing old
+copies, and using cached copies if map failed to reload.
+
* Peter Breitenlohner <peb@mppmu.mpg.de>
July 24, 1999: patch for linux 2.2.x to work with older libc5 systems, and
nis_isup mis-logic fixes.
@@ -267,3 +270,7 @@ July 14, 1999: add netgrpd() syntax function which uses FQHN.
* Andrew J. Korty <ajk@purdue.edu>
September 5, 1999: pawd works for type:=nfsl.
+
+* Nick Williams <njw@ms.com>
+September 1, 1999: bug fix for incorrect symlinks when two locations are
+requested simultaneously.
diff --git a/contrib/amd/BUGS b/contrib/amd/BUGS
index 797eb26..3bd0f16 100644
--- a/contrib/amd/BUGS
+++ b/contrib/amd/BUGS
@@ -5,7 +5,7 @@
(1) mips-sgi-irix*
-[1A] known to have flakey NFS V.3 and TCP. Amd tends to hang or spin
+[1A] known to have flaky NFS V.3 and TCP. Amd tends to hang or spin
infinitely after a few hours or days of use. Users must install recommended
patches from vendor. Patches help, but not all the time. Otherwise avoid
using NFS V.3 and TCP on these systems, by setting
@@ -14,7 +14,7 @@ using NFS V.3 and TCP on these systems, by setting
[1B] yp_all() leaks a file descriptor. Eventually amd runs out of file
descriptors and hangs. Am-utils circumvents this by using its own version
-of yp_all which uses udp and iterats over NIS maps. The latter isn't as
+of yp_all which uses udp and iterates over NIS maps. The latter isn't as
reliable as yp_all() which uses TCP, but it is better than hanging.
(I have some reports that older version of hpux-9, with older libc, also
@@ -113,3 +113,16 @@ but it is not yet in the glibc-2.0.7-19 RPM.
A bug in libc results in an amq binary that doesn't work; amq -v dumps core
in xdr_string. There is no known fix (source code or vendor patch) at this
time. (Please let amd-dev know if you know of a fix.)
+
+
+(7) *-aix4.3.2.0
+
+The plock() function appears to fail with ENOMEM (Not Enough Space). When
+it fails, it consumes a lot of memory. This appears to be an AIX bug. I
+think plock returns an error code, but it partially succeeds to lock some
+pages, thus increasing memory consumption. When partial failures occur, it
+is possible that AIX fails to unlock those pages it did lock. Solution:
+turn off usage of plock on AIX. Put plock=no in your amd.conf file (which
+is the default if you do nothing).
+
+Erez.
diff --git a/contrib/amd/ChangeLog b/contrib/amd/ChangeLog
index 7c088f1..ca984a2 100644
--- a/contrib/amd/ChangeLog
+++ b/contrib/amd/ChangeLog
@@ -1,5 +1,134 @@
+1999-10-13 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * released snapshot am-utils-6.0.3s1
+
+1999-10-12 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * amd/amd.c (main): On AIX you must lower the stack size using
+ ulimit() before calling plock. Otherwise plock will reserve a lot
+ of memory space based on your maximum stack size limit. Since it
+ is not easily possible to tell what should the limit be, I print a
+ warning before calling plock(). See the manual pages for
+ ulimit(1,3,4) on your AIX system.
+
+ * include/am_defs.h: define default extern for vsnprintf()
+
+ * aux/configure.in: check for extern definition for vsnprintf()
+
+1999-10-08 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * amd/amfs_auto.c (amfs_auto_bgmount): patch from Nick Williams
+ <njw@ms.com>. SYMPTOMS: 'occasionally' sublinks do not point to
+ the correct location, but to the top level of the mountpoint and
+ an (error-hook) is seen being mounted in the log file. This causes
+ things to Go Wrong(TM).
+ CAUSE: When evaluating two locations which are requested
+ 'practically simultaneously', and the two locations resolve to the
+ same NFS mountpoint (but different sublinks), the later request
+ will be "deferred" and retried after wakeup when the first mount
+ succeeds. To do this, it rewinds the options location string to
+ re-evaluate the location when the mount is retried. However, it
+ shouldn't rewind the options for two reasons: (a) the semantics of
+ the map language say you shouldn't and (b) the NFS mount reference
+ is not reset at the same time, meaning that on the retry it will
+ have an options structure out-of-sync with the mount
+ structure. The "shortcut" code when retrying the mount sees the
+ mount structure is already filled in and does not fully evaluate
+ the options structure.... so if the first location is not the one
+ which ties in with the mountpoint (see ordering in the
+ recreate-by), you're now well messed up.
+
+ * BUGS: mention aix4.3 plock() bug (memory usage blows up and
+ plock fails)
+
+1999-10-07 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * aux/GNUmakefile: certain files should be copied if they are
+ newer, not also if they are bigger: install-sh, ltconfig,
+ ltmain.sh, mdate-sh, missing, mkinstalldirs, and texinfo.tex.
+
+ * minor new port: i586-pc-linux-gnu-rh6.1 (RedHat Linux 6.1)
+
+1999-10-05 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * aux/macros/check_nfs_prot_headers.m4: prepare for OSF-5.
+
+ * aux/macros/check_nfs_fh_dref.m4: prepare for Tru64, aka OSF-5.
+
+1999-09-30 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ *******************************************************************
+ *** Released am-utils-6.0.2 ***
+ *******************************************************************
+
+1999-09-27 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * conf/mount/mount_linux.c (mount_linux): print the updated mount
+ flags.
+
+ * doc/am-utils.texi: document $full_os and $vendor.
+
+ * scripts/amd.conf-sample: examples of $full_os and $vendor.
+
+ * scripts/amd.conf.5: document $full_os and $vendor.
+
+ * amd/conf.c: add support for $full_os and $vendor.
+
+1999-09-26 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * doc/am-utils.texi (netgrp Selector Function): don't give
+ examples with old single '=' assignment variable. Use foo:=bar.
+
+ * amd/amfs_auto.c (amfs_auto_bgmount): corectly indent long
+ comment describing this complex function.
+
+ * doc/Makefile.am (alldocs): do install-ps last (because distiller
+ is slow) and install-html next to last (because texi2html is also
+ slow).
+
+ * amd/amd.8: Major fixes to the description of the option -t
+ timeout.retransmit.
+
+ * doc/am-utils.texi: better description of "trace" debug option.
+ amd -H (not -v) shows log_options and debug_options. Major fixes
+ to the description of amd -t timeout.retransmit, and the amd.conf
+ parameters nfs_retransmit_counter and nfs_retry_interval.
+
+ * scripts/amd.conf.5: better description of "trace" debug option.
+ amd -H (not -v) shows log_options and debug_options. Major fixes
+ to the description of the parameters nfs_retransmit_counter and
+ nfs_retry_interval.
+
+1999-09-25 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * doc/am-utils.texi (Automount Filesystem): cache:= is not a mount
+ option, but a mount map option.
+
+ * libamu/xutil.c (switch_to_logfile): log the name of the log file
+ we switched into, after the log file had been [re]opened.
+
+1999-09-24 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+
+ * amd/mapc.c (mapc_reload_map): count and show the number of times
+ a map was reloaded. Only reload a map if its modify-time was
+ updated. But amq -f forced a reload no matter what.
+
+ * amd/amd.h: new flag to struct mnt_map to count number of times a
+ map was reloaded.
+
+ * amd/mapc.c (mapc_reload_map): attempt to reload the map without
+ losing current data by reloading into a temp copy, and switching
+ the hashes round only if the reload was successful. Patch from Jon
+ Peatfield <J.S.Peatfield@damtp.cam.ac.uk>.
+ (mapc_sync): mapc_reload_map() always succeeds.
+
1999-09-22 Erez Zadok <ezk@shekel.mcl.cs.columbia.edu>
+ * amd/info_ldap.c (amu_ldap_rebind): don't busy-loop trying to
+ rebind to an LDAP server forever. Try up to 10 times.
+
+ * fsinfo/fsi_lex.l (yyerror): rework code that will never happen
+
* released snapshot am-utils-6.0.2s2
* aux/configure.in: bumped library version-info to 3:2:1, since
diff --git a/contrib/amd/INSTALL b/contrib/amd/INSTALL
index 3ea5b57..8a21b41 100644
--- a/contrib/amd/INSTALL
+++ b/contrib/amd/INSTALL
@@ -56,6 +56,7 @@ i486-pc-linux-gnuoldld ezk ezk ezk ezk
i586-pc-linux-gnu ezk ezk ezk ezk
i586-pc-linux-gnu-rh5.2 ezk ezk ezk ezk
i586-pc-linux-gnu-rh6.0 ezk ezk ezk ezk
+i586-pc-linux-gnu-rh6.1 ezk ezk ezk ezk
i586-pc-linux-gnulibc1 ezk ezk ezk ezk
i586-pc-linux-gnulibc1-rh4.2 ezk ezk ezk ezk
i686-pc-linux-gnu ezk ezk ezk ezk
diff --git a/contrib/amd/NEWS b/contrib/amd/NEWS
index 9e7a87e..c33358f 100644
--- a/contrib/amd/NEWS
+++ b/contrib/amd/NEWS
@@ -1,5 +1,31 @@
# -*- text -*-
+*** Notes specific to am-utils version 6.0.2:
+
+- safe map reloads: when a map needs to be reloaded, it is reloaded into a
+ temporary copy first. Only if the reload was completely successful, Amd
+ discards the old map and uses the new one. Otherwise Amd continues to use
+ the old maps. This should help a lot with transient NIS problems.
+
+- amq -f now also forces a (safe) map reload, but only if the timestamp on
+ the maps was updated.
+
+- two new selector variables: ${vendor} and ${full_os}, which are the same
+ as the output seen in "amd -v".
+
+- documentation fixes and updates
+
+- updated or minor new ports:
+ i386-unknown-freebsdelf3.3
+
+- support 'ignore' flags (automntfs) in bsdi-4.1
+
+- bugs fixed:
+ expn.pl uses correct sockaddr_in() not, pack()
+ make sure configure --enable-*args take an argument
+ don't busy-loop trying to rebind to ldap servers
+ use vsnprintf, not vsprintf (security)
+
*** Notes specific to am-utils version 6.0.1:
- updated or minor new ports:
diff --git a/contrib/amd/amd/amd.8 b/contrib/amd/amd/amd.8
index 9fd0b76..0e68d0f 100644
--- a/contrib/amd/amd/amd.8
+++ b/contrib/amd/amd/amd.8
@@ -38,7 +38,7 @@
.\"
.\" %W% (Berkeley) %G%
.\"
-.\" $Id: amd.8,v 1.2 1999/01/10 21:53:40 ezk Exp $
+.\" $Id: amd.8,v 1.3 1999/09/30 21:01:29 ezk Exp $
.\"
.TH AMD 8 "3 November 1989"
.SH NAME
@@ -206,15 +206,20 @@ been auto-mounted,
it.
.TP
-.BI \-t " interval.interval"
-Specify the
+.BI \-t " timeout.retransmit"
+Specify the NFS timeout
.IR interval ,
-in tenths of a second, between NFS/RPC/UDP retries.
-The default is 0.8 seconds.
-The second values alters the restransmit counter.
-Useful defaults are supplied if either or both
+in tenths of a second, between NFS/RPC retries (for UDP only). The default
+is 0.8 seconds. The second value alters the restransmit counter, which
+defaults to 11 retransmissions. Both of these values are used by the kernel
+to communicate with amd. Useful defaults are supplied if either or both
values are missing.
+Amd relies on the kernel RPC retransmit mechanism to trigger mount retries.
+The values of these parameters change the overall retry interval. Too long
+an interval gives poor interactive response; too short an interval causes
+excessive retries.
+
.TP
.B \-v
Version. Displays version and configuration information on standard error.
diff --git a/contrib/amd/amd/amd.c b/contrib/amd/amd/amd.c
index a272625..3f3da1b 100644
--- a/contrib/amd/amd/amd.c
+++ b/contrib/amd/amd/amd.c
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amd.c,v 1.5 1999/02/04 07:24:14 ezk Exp $
+ * $Id: amd.c,v 1.6 1999/09/30 21:01:29 ezk Exp $
*
*/
@@ -248,6 +248,12 @@ init_global_options(void)
/* OS version */
gopt.op_sys_ver = HOST_OS_VERSION;
+ /* full OS name and version */
+ gopt.op_sys_full = HOST_OS;
+
+ /* OS version */
+ gopt.op_sys_vendor = HOST_VENDOR;
+
/* pid file */
gopt.pid_file = "/dev/stdout";
@@ -498,6 +504,16 @@ main(int argc, char *argv[])
*/
#ifdef HAVE_PLOCK
if (gopt.flags & CFM_PROCESS_LOCK) {
+# ifdef _AIX
+ /*
+ * On AIX you must lower the stack size using ulimit() before calling
+ * plock. Otherwise plock will reserve a lot of memory space based on
+ * your maximum stack size limit. Since it is not easily possible to
+ * tell what should the limit be, I print a warning before calling
+ * plock(). See the manual pages for ulimit(1,3,4) on your AIX system.
+ */
+ plog(XLOG_WARNING, "AIX: may need to lower stack size using ulimit(3) before calling plock");
+# endif /* _AIX */
if (plock(PROCLOCK) != 0) {
plog(XLOG_WARNING, "Couldn't lock process text and data segment in memory: %m");
} else {
diff --git a/contrib/amd/amd/amd.h b/contrib/amd/amd/amd.h
index 0264d70..c896022 100644
--- a/contrib/amd/amd/amd.h
+++ b/contrib/amd/amd/amd.h
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amd.h,v 1.3 1999/02/04 07:24:14 ezk Exp $
+ * $Id: amd.h,v 1.4 1999/09/30 21:01:29 ezk Exp $
*
*/
@@ -106,8 +106,10 @@ struct amu_global_options {
char *cluster; /* cluster name */
char *karch; /* kernel architecture */
char *logfile; /* amd log file */
- char *op_sys; /* operating system name */
- char *op_sys_ver; /* OS version */
+ char *op_sys; /* operating system name ${os} */
+ char *op_sys_ver; /* OS version ${osver} */
+ char *op_sys_full; /* full OS name ${full_os} */
+ char *op_sys_vendor; /* name of OS vendor ${vendor} */
char *pid_file; /* PID file */
char *sub_domain; /* local domain */
char *map_options; /* global map options */
@@ -163,6 +165,7 @@ struct mnt_map {
short flags; /* Allocation flags */
short alloc; /* Allocation mode */
time_t modify; /* Modify time of map */
+ u_int reloads; /* Number of times map was reloaded */
char *map_name; /* Name of this map */
char *wildcard; /* Wildcard value */
reload_fn *reload; /* Function to be used for reloads */
diff --git a/contrib/amd/amd/amfs_auto.c b/contrib/amd/amd/amfs_auto.c
index 36f7b09..f04cc50 100644
--- a/contrib/amd/amd/amfs_auto.c
+++ b/contrib/amd/amd/amfs_auto.c
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amfs_auto.c,v 1.4 1999/08/09 06:09:43 ezk Exp $
+ * $Id: amfs_auto.c,v 1.5 1999/09/30 21:01:29 ezk Exp $
*
*/
@@ -449,59 +449,59 @@ try_mount(voidp mvp)
* Pick a file system to try mounting and
* do that in the background if necessary
*
- For each location:
- if it is new -defaults then
- extract and process
- continue;
- fi
- if it is a cut then
- if a location has been tried then
- break;
- fi
- continue;
- fi
- parse mount location
- discard previous mount location if required
- find matching mounted filesystem
- if not applicable then
- this_error = No such file or directory
- continue
- fi
- if the filesystem failed to be mounted then
- this_error = error from filesystem
- elif the filesystem is mounting or unmounting then
- this_error = -1
- elif the fileserver is down then
- this_error = -1
- elif the filesystem is already mounted
- this_error = 0
- break
- fi
- if no error on this mount then
- this_error = initialize mount point
- fi
- if no error on this mount and mount is delayed then
- this_error = -1
- fi
- if this_error < 0 then
- retry = true
- fi
- if no error on this mount then
- make mount point if required
- fi
- if no error on this mount then
- if mount in background then
- run mount in background
- return -1
- else
- this_error = mount in foreground
- fi
- fi
- if an error occurred on this mount then
- update stats
- save error in mount point
- fi
- endfor
+For each location:
+ if it is new -defaults then
+ extract and process
+ continue;
+ fi
+ if it is a cut then
+ if a location has been tried then
+ break;
+ fi
+ continue;
+ fi
+ parse mount location
+ discard previous mount location if required
+ find matching mounted filesystem
+ if not applicable then
+ this_error = No such file or directory
+ continue
+ fi
+ if the filesystem failed to be mounted then
+ this_error = error from filesystem
+ elif the filesystem is mounting or unmounting then
+ this_error = -1
+ elif the fileserver is down then
+ this_error = -1
+ elif the filesystem is already mounted
+ this_error = 0
+ break
+ fi
+ if no error on this mount then
+ this_error = initialize mount point
+ fi
+ if no error on this mount and mount is delayed then
+ this_error = -1
+ fi
+ if this_error < 0 then
+ retry = true
+ fi
+ if no error on this mount then
+ make mount point if required
+ fi
+ if no error on this mount then
+ if mount in background then
+ run mount in background
+ return -1
+ else
+ this_error = mount in foreground
+ fi
+ fi
+ if an error occurred on this mount then
+ update stats
+ save error in mount point
+ fi
+endfor
*/
static int
amfs_auto_bgmount(struct continuation * cp, int mpe)
@@ -706,6 +706,10 @@ amfs_auto_bgmount(struct continuation * cp, int mpe)
if (!mf_retry)
mf_retry = dup_mntfs(mf);
cp->retry = TRUE;
+#ifdef DEBUG
+ dlog("will retry ...\n");
+#endif /* DEBUG */
+ break;
}
if (!this_error) {
@@ -765,8 +769,9 @@ amfs_auto_bgmount(struct continuation * cp, int mpe)
* Rewind the location vector and
* reset the default options.
*/
- cp->ivec = cp->xivec;
- cp->def_opts = strealloc(cp->def_opts, cp->auto_opts);
+#ifdef DEBUG
+ dlog("(skipping rewind)\n");
+#endif /* DEBUG */
/*
* Arrange that amfs_auto_bgmount is called
* after anything else happens.
diff --git a/contrib/amd/amd/amfs_program.c b/contrib/amd/amd/amfs_program.c
index 5020190..fd03231 100644
--- a/contrib/amd/amd/amfs_program.c
+++ b/contrib/amd/amd/amfs_program.c
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: amfs_program.c,v 1.4 1999/06/24 06:15:55 ezk Exp $
+ * $Id: amfs_program.c,v 1.5 1999/09/30 21:01:30 ezk Exp $
*
*/
@@ -89,7 +89,7 @@ amfs_program_match(am_opts *fo)
char *prog;
if (!fo->opt_mount || !fo->opt_unmount) {
- plog(XLOG_USER, "program: no mount/unmount specified");
+ plog(XLOG_ERROR, "program: both mount and unmount must be specified");
return 0;
}
prog = strchr(fo->opt_mount, ' ');
diff --git a/contrib/amd/amd/conf.c b/contrib/amd/amd/conf.c
index 99a9475..a45e130 100644
--- a/contrib/amd/amd/conf.c
+++ b/contrib/amd/amd/conf.c
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: conf.c,v 1.4 1999/02/04 07:24:15 ezk Exp $
+ * $Id: conf.c,v 1.5 1999/09/30 21:01:30 ezk Exp $
*
*/
@@ -82,6 +82,7 @@ static int gopt_cache_duration(const char *val);
static int gopt_cluster(const char *val);
static int gopt_debug_options(const char *val);
static int gopt_dismount_interval(const char *val);
+static int gopt_full_os(const char *val);
static int gopt_fully_qualified_hosts(const char *val);
static int gopt_hesiod_base(const char *val);
static int gopt_karch(const char *val);
@@ -111,6 +112,7 @@ static int gopt_search_path(const char *val);
static int gopt_selectors_on_default(const char *val);
static int gopt_show_statfs_entries(const char *val);
static int gopt_unmount_on_exit(const char *val);
+static int gopt_vendor(const char *val);
static int process_global_option(const char *key, const char *val);
static int process_regular_map(cf_map_t *cfm);
static int process_regular_option(const char *section, const char *key, const char *val, cf_map_t *cfm);
@@ -137,6 +139,7 @@ static struct _func_map glob_functable[] = {
{"debug_options", gopt_debug_options},
{"dismount_interval", gopt_dismount_interval},
{"fully_qualified_hosts", gopt_fully_qualified_hosts},
+ {"full_os", gopt_full_os},
{"hesiod_base", gopt_hesiod_base},
{"karch", gopt_karch},
{"ldap_base", gopt_ldap_base},
@@ -165,6 +168,7 @@ static struct _func_map glob_functable[] = {
{"selectors_on_default", gopt_selectors_on_default},
{"show_statfs_entries", gopt_show_statfs_entries},
{"unmount_on_exit", gopt_unmount_on_exit},
+ {"vendor", gopt_vendor},
{NULL, NULL}
};
@@ -390,6 +394,14 @@ gopt_dismount_interval(const char *val)
static int
+gopt_full_os(const char *val)
+{
+ gopt.op_sys_full = strdup((char *)val);
+ return 0;
+}
+
+
+static int
gopt_fully_qualified_hosts(const char *val)
{
if (STREQ(val, "yes")) {
@@ -767,6 +779,14 @@ gopt_unmount_on_exit(const char *val)
}
+static int
+gopt_vendor(const char *val)
+{
+ gopt.op_sys_vendor = strdup((char *)val);
+ return 0;
+}
+
+
/*
* Collect one entry for a regular map
*/
diff --git a/contrib/amd/amd/get_args.c b/contrib/amd/amd/get_args.c
index a6316d3..6c4445a 100644
--- a/contrib/amd/amd/get_args.c
+++ b/contrib/amd/amd/get_args.c
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: get_args.c,v 1.3 1999/01/10 21:53:45 ezk Exp $
+ * $Id: get_args.c,v 1.4 1999/09/30 21:01:31 ezk Exp $
*
*/
@@ -99,7 +99,7 @@ get_version_string(void)
cpu, endian, gopt.arch, gopt.karch);
strcat(vers, tmpbuf);
sprintf(tmpbuf, "full_os=%s, os=%s, osver=%s, vendor=%s.\n",
- HOST_OS, gopt.op_sys, gopt.op_sys_ver, HOST_VENDOR);
+ gopt.op_sys_full, gopt.op_sys, gopt.op_sys_ver, gopt.op_sys_vendor);
strcat(vers, tmpbuf);
strcat(vers, "Map support for: ");
diff --git a/contrib/amd/amd/info_ldap.c b/contrib/amd/amd/info_ldap.c
index 9fc0212..a2bd9ba 100644
--- a/contrib/amd/amd/info_ldap.c
+++ b/contrib/amd/amd/info_ldap.c
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: info_ldap.c,v 1.5 1999/08/22 05:12:50 ezk Exp $
+ * $Id: info_ldap.c,v 1.6 1999/09/30 21:01:31 ezk Exp $
*
*/
@@ -238,6 +238,7 @@ amu_ldap_rebind(ALD *a)
HE *h;
CR *c = a->credentials;
time_t now = clocktime();
+ int try;
if (a->ldap != NULL) {
if ((a->timestamp - now) > AMD_LDAP_TTL) {
@@ -250,7 +251,7 @@ amu_ldap_rebind(ALD *a)
return (0);
}
- while (TRUE) {
+ for (try=0; try<10; try++) { /* XXX: try up to 10 times (makes sense?) */
for (h = a->hostent; h != NULL; h = h->next) {
if ((ld = ldap_open(h->host, h->port)) == NULL) {
plog(XLOG_WARNING, "Unable to ldap_open to %s:%d\n", h->host, h->port);
diff --git a/contrib/amd/amd/mapc.c b/contrib/amd/amd/mapc.c
index a78e81b..e27928b 100644
--- a/contrib/amd/amd/mapc.c
+++ b/contrib/amd/amd/mapc.c
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: mapc.c,v 1.4 1999/08/09 06:09:44 ezk Exp $
+ * $Id: mapc.c,v 1.5 1999/09/30 21:01:31 ezk Exp $
*
*/
@@ -139,6 +139,7 @@ qelem map_list_head = {&map_list_head, &map_list_head};
static const char *get_full_path(const char *map, const char *path, const char *type);
static int mapc_meta_search(mnt_map *, char *, char **, int);
static void mapc_sync(mnt_map *);
+static void mapc_clear(mnt_map *);
/* ROOT MAP */
static int root_init(mnt_map *, char *, time_t *);
@@ -488,19 +489,65 @@ mapc_find_wildcard(mnt_map *m)
/*
- * Do a map reload
+ * Do a map reload.
+ * Attempt to reload without losing current data by switching the hashes
+ * round.
*/
-static int
+static void
mapc_reload_map(mnt_map *m)
{
int error;
+ kv *maphash[NKVHASH], *tmphash[NKVHASH];
+
+ /*
+ * skip reloading maps that have not been modified, unless
+ * amq -f was used (do_mapc_reload is 0)
+ */
+ if (m->reloads != 0 && do_mapc_reload != 0) {
+ time_t t;
+ error = (*m->mtime) (m, m->map_name, &t);
+ if (!error) {
+ if (t <= m->modify) {
+ plog(XLOG_INFO, "reload of map %s is not needed (in sync)", m->map_name);
+#ifdef DEBUG
+ dlog("map %s last load time is %d, last modify time is %d",
+ m->map_name, (int) m->modify, (int) t);
+#endif /* DEBUG */
+ return;
+ } else {
+ /* reload of the map is needed, update map reload time */
+ m->modify = t;
+ }
+ }
+ }
+
+ /* copy the old hash and zero the map */
+ memcpy((voidp) maphash, (voidp) m->kvhash, sizeof(m->kvhash));
+ memset((voidp) m->kvhash, 0, sizeof(m->kvhash));
#ifdef DEBUG
dlog("calling map reload on %s", m->map_name);
#endif /* DEBUG */
error = (*m->reload) (m, m->map_name, mapc_add_kv);
- if (error)
- return error;
+ if (error) {
+ if (m->reloads == 0)
+ plog(XLOG_FATAL, "first time load of map %s failed!", m->map_name);
+ else
+ plog(XLOG_ERROR, "reload of map %s failed - using old values",
+ m->map_name);
+ mapc_clear(m);
+ memcpy((voidp) m->kvhash, (voidp) maphash, sizeof(m->kvhash));
+ } else {
+ if (m->reloads++ == 0)
+ plog(XLOG_INFO, "first time load of map %s succeeded", m->map_name);
+ else
+ plog(XLOG_INFO, "reload #%d of map %s succeeded",
+ m->reloads, m->map_name);
+ memcpy((voidp) tmphash, (voidp) m->kvhash, sizeof(m->kvhash));
+ memcpy((voidp) m->kvhash, (voidp) maphash, sizeof(m->kvhash));
+ mapc_clear(m);
+ memcpy((voidp) m->kvhash, (voidp) tmphash, sizeof(m->kvhash));
+ }
m->wildcard = 0;
#ifdef DEBUG
@@ -509,8 +556,6 @@ mapc_reload_map(mnt_map *m)
error = mapc_search(m, wildcard, &m->wildcard);
if (error)
m->wildcard = 0;
-
- return 0;
}
@@ -621,6 +666,7 @@ mapc_create(char *map, char *opt, const char *type)
m->map_name = strdup(map);
m->refc = 1;
m->wildcard = 0;
+ m->reloads = 0;
/*
* synchronize cache with reality
@@ -881,16 +927,16 @@ mapc_sync(mnt_map *m)
}
}
- mapc_clear(m);
-
- if (m->alloc >= MAPC_ALL)
- if (mapc_reload_map(m))
- m->alloc = MAPC_INC;
- /*
- * Attempt to find the wildcard entry
- */
- if (m->alloc < MAPC_ALL)
+ if (m->alloc >= MAPC_ALL) {
+ /* mapc_reload_map() always works */
+ mapc_reload_map(m);
+ } else {
+ mapc_clear(m);
+ /*
+ * Attempt to find the wildcard entry
+ */
mapc_find_wildcard(m);
+ }
}
}
diff --git a/contrib/amd/amd/opts.c b/contrib/amd/amd/opts.c
index b2d7ff9..d564e69 100644
--- a/contrib/amd/amd/opts.c
+++ b/contrib/amd/amd/opts.c
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: opts.c,v 1.5 1999/08/16 01:16:23 ezk Exp $
+ * $Id: opts.c,v 1.6 1999/09/30 21:01:32 ezk Exp $
*
*/
@@ -175,6 +175,10 @@ static struct opt opt_fields[] = {
0, &gopt.op_sys, 0, TRUE },
{ S("osver"),
0, &gopt.op_sys_ver, 0, TRUE },
+ { S("full_os"),
+ 0, &gopt.op_sys_full, 0, TRUE },
+ { S("vendor"),
+ 0, &gopt.op_sys_vendor, 0, TRUE },
{ S("remopts"),
&fs_static.opt_remopts, 0, 0, FALSE },
{ S("mount"),
diff --git a/contrib/amd/doc/am-utils.texi b/contrib/amd/doc/am-utils.texi
index a4950ab..12bda8f 100644
--- a/contrib/amd/doc/am-utils.texi
+++ b/contrib/amd/doc/am-utils.texi
@@ -38,7 +38,7 @@
@c
@c %W% (Berkeley) %G%
@c
-@c $Id: am-utils.texi,v 1.10 1999/09/08 23:36:49 ezk Exp $
+@c $Id: am-utils.texi,v 1.12 1999/09/30 21:01:39 ezk Exp $
@c
@setfilename am-utils.info
@@ -889,6 +889,10 @@ features.
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ?
+@item @b{i586-pc-linux-gnu-rh6.1}
+@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
+@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ?
+
@item @b{i586-pc-linux-gnulibc1}
@c {Config} {Compile} {Amd} {NFS V.3} {Shlib} {Hlfsd}
@tab yes @tab yes @tab yes @tab n/a @tab yes @tab ?
@@ -1638,6 +1642,8 @@ These are the selectors currently implemented.
* karch Selector Variable::
* os Selector Variable::
* osver Selector Variable::
+* full_os Selector Variable::
+* vendor Selector Variable::
* key Selector Variable::
* map Selector Variable::
@@ -1785,7 +1791,7 @@ be displayed by running the command @samp{amd -v}. @xref{Supported
Platforms}.@refill
@c ----------------------------------------------------------------
-@node osver Selector Variable, key Selector Variable, os Selector Variable, Selectors
+@node osver Selector Variable, full_os Selector Variable, os Selector Variable, Selectors
@comment node-name, next, previous, up
@subsubsection osver Selector Variable
@cindex osver Selector Variable
@@ -1799,6 +1805,34 @@ be displayed by running the command @samp{amd -v}. @xref{Supported
Platforms}.@refill
@c ----------------------------------------------------------------
+@node full_os Selector Variable, vendor Selector Variable, osver Selector Variable, Selectors
+@comment node-name, next, previous, up
+@subsubsection full_os Selector Variable
+@cindex full_os Selector Variable
+@cindex full_os, mount selector
+@cindex Mount selector; full_os
+@cindex Selector; full_os
+
+The full name of the operating system, including its version. This
+value is automatically determined at compile time. The full operating
+system name and version can be displayed by running the command
+@samp{amd -v}. @xref{Supported Platforms}.@refill
+
+@c ----------------------------------------------------------------
+@node vendor Selector Variable, key Selector Variable, full_os Selector Variable, Selectors
+@comment node-name, next, previous, up
+@subsubsection vendor Selector Variable
+@cindex vendor Selector Variable
+@cindex vendor, mount selector
+@cindex Mount selector; vendor
+@cindex Selector; vendor
+
+The name of the vendor of the operating system. This value is
+automatically determined at compile time. The name of the vendor can be
+displayed by running the command @samp{amd -v}. @xref{Supported
+Platforms}.@refill
+
+@c ----------------------------------------------------------------
@ifhtml
<HR>
@end ifhtml
@@ -1809,7 +1843,7 @@ expanded prior to a map lookup, these selectors are all defined as empty
strings.
@c ----------------------------------------------------------------
-@node key Selector Variable, map Selector Variable, osver Selector Variable, Selectors
+@node key Selector Variable, map Selector Variable, vendor Selector Variable, Selectors
@comment node-name, next, previous, up
@subsubsection key Selector Variable
@cindex key Selector Variable
@@ -1948,7 +1982,7 @@ directory. A common map to use for both might look like the following:
@example
home/* netgrp(ppp-hosts);type:=link;fs:=/local/$@{key@} \
- !netgrp(ppp-hosts);type:=nfs;rhost=serv1;rfs:=/remote/$@{key@}
+ !netgrp(ppp-hosts);type:=nfs;rhost:=serv1;rfs:=/remote/$@{key@}
@end example
@c ----------------------------------------------------------------
@@ -2719,7 +2753,7 @@ single host in a mount map.
@cindex Operating System version
@cindex Setting the Operating System version
-Override the compiled-in version number of the operating system, with
+Overrides the compiled-in version number of the operating system, with
@var{op-sys-ver}. Useful when the built-in version is not desired for
backward compatibility reasons. For example, if the built-in version is
@samp{2.5.1}, you can override it to @samp{5.5.1}, and use older maps
@@ -2762,14 +2796,16 @@ Tells @i{Amd} to restart existing mounts (@pxref{Inheritance Filesystem}).
@section @code{-t} @var{timeout.retransmit}
@cindex Setting Amd's RPC parameters
-Specifies the RPC @dfn{timeout} and @dfn{retransmit} intervals used by
-the kernel to communicate to @i{Amd}. These are used to set the
-@samp{timeo} and @samp{retrans} mount options.
+Specifies the RPC @dfn{timeout} interval and the @dfn{retransmit}
+counter used by the kernel to communicate to @i{Amd}. These are used to
+set the @samp{timeo} and @samp{retrans} mount options, respectively.
+The default timeout is 0.8 seconds, and the default number of
+retransmissions is 11.
@i{Amd} relies on the kernel RPC retransmit mechanism to trigger mount
-retries. The value of this parameter changes the retry interval. Too
-long an interval gives poor interactive response, too short an interval
-causes excessive retries.
+retries. The values of these parameters change the overall retry
+interval. Too long an interval gives poor interactive response; too
+short an interval causes excessive retries.
@c ----------------------------------------------------------------
@node -v Option, -w Option, -t Option, Amd Command Line Options
@@ -2804,9 +2840,10 @@ The information includes the version number, number of times @i{Amd} was
compiled on the local system, release date and name of the release.
Following come the cpu type, byte ordering, and the architecture and
kernel architecture as @code{$@{arch@}} and @code{$@{karch@}},
-respectively. The next line lists the full name of the system, the
-variables @code{$@{os@}} and @code{$@{osver@}}, and the vendor's
-name. @xref{Supported Platforms}.
+respectively. The next line lists the operating system full name, short
+name, version, and vendor. These four values correspond to the
+variables @code{$@{full_os@}}, @code{$@{os@}}, @code{$@{osver@}}, and
+@code{$@{vendor@}}, respectively. @xref{Supported Platforms}.
Then come a list of map types supported, filesystems internally
supported by @i{Amd} (AMFS), and generic filesystems available (FS).
@@ -2982,7 +3019,7 @@ debug string munging
@item test
full debug but no daemon
@item trace
-protocol trace
+trace RPC protocol and NFS mount arguments
@end table
You may also refer to the program source for a more detailed explanation
@@ -3022,7 +3059,7 @@ Print a brief help and usage string.
@cindex Operating System name
@cindex Setting the Operating System name
-Override the compiled-in name of the operating system, with
+Overrides the compiled-in name of the operating system, with
@var{op-sys-name}. Useful when the built-in name is not desired for
backward compatibility reasons. For example, if the build in name is
@samp{sunos5}, you can override it to the old name @samp{sos5}, and use
@@ -3563,11 +3600,11 @@ XXX: THIS FILESYSTEM IS NOT IMPLEMENTED YET!
@cindex program, filesystem type
@cindex Filesystem type; program
-The @dfn{program} (@samp{type:=program}) filesystem type allows a program to be run whenever a
-mount or unmount is required. This allows easy addition of support for
-other filesystem types, such as MIT's Remote Virtual Disk (RVD)
-which has a programmatic interface via the commands
-@samp{rvdmount} and @samp{rvdunmount}.
+The @dfn{program} (@samp{type:=program}) filesystem type allows a
+program to be run whenever a mount or unmount is required. This allows
+easy addition of support for other filesystem types, such as MIT's
+Remote Virtual Disk (RVD) which has a programmatic interface via the
+commands @samp{rvdmount} and @samp{rvdunmount}.
@noindent
The following options must be specified:
@@ -3752,12 +3789,13 @@ another machine.
The following options may be specified:
@table @code
-@cindex cache, mount option
-@cindex Mount option; cache
+@cindex cache, mount map option
+@cindex Mount map option; cache
@item cache
specifies whether the data in this mount-map should be
cached. The default value is @samp{none}, in which case
no caching is done in order to conserve memory.
+
However, better performance and reliability can be obtained by caching
some or all of a mount-map.
@@ -3846,11 +3884,11 @@ dylan/dk5 type:=ufs;dev:=/dev/dsk/5s0
@cindex direct, filesystem type
@cindex Filesystem type; direct
-The @dfn{direct} (@samp{type:=direct}) filesystem is almost identical to the automount
-filesystem. Instead of appearing to be a directory of mount points, it
-appears as a symbolic link to a mounted filesystem. The mount is done
-at the time the link is accessed. @xref{Automount Filesystem}, for a
-list of required options.
+The @dfn{direct} (@samp{type:=direct}) filesystem is almost identical to
+the automount filesystem. Instead of appearing to be a directory of
+mount points, it appears as a symbolic link to a mounted filesystem.
+The mount is done at the time the link is accessed. @xref{Automount
+Filesystem}, for a list of required options.
Direct automount points are created by specifying the @samp{direct}
filesystem type on the command line:
@@ -4192,6 +4230,7 @@ The following parameters are applicable to the @samp{[global]} section only.
* cluster Parameter::
* debug_options Parameter::
* dismount_interval Parameter::
+* full_os Parameter::
* fully_qualified_hosts Parameter::
* hesiod_base Parameter::
* karch Parameter::
@@ -4217,6 +4256,7 @@ The following parameters are applicable to the @samp{[global]} section only.
* selectors_on_default Parameter::
* show_statfs_entries Parameter::
* unmount_on_exit Parameter::
+* vendor Parameter::
@end menu
@c ----------------------------------------------------------------
@@ -4263,14 +4303,15 @@ in the cache.
@subsection @t{debug_options} Parameter
@cindex debug_options Parameter
-(type=string, default no debug options). Same as the @code{-D}
-option to @i{Amd}. Specify any debugging options for @i{Amd}. Works
-only if am-utils was configured for debugging using the
-@code{--enable-debug} option. The @samp{mem} option alone can be turned
-on via @code{--enable-debug=mem}. Otherwise debugging options are
-ignored. Options are comma delimited, and can be preceded by the string
-@samp{no} to negate their meaning. You can get the list of supported
-debugging options by running @code{amd -v}. Possible values are:
+(type=string, default no debug options). Same as the @code{-D} option
+to @i{Amd}. Specify any debugging options for @i{Amd}. Works only if
+am-utils was configured for debugging using the @code{--enable-debug}
+option. The @samp{mem} option, as well as all other options, can be
+turned on via @code{--enable-debug=mem}. Otherwise debugging options
+are ignored. Options are comma delimited, and can be preceded by the
+string @samp{no} to negate their meaning. You can get the list of
+supported debugging and logging options by running @code{amd -H}.
+Possible values are:
@table @samp
@item all
@@ -4292,11 +4333,11 @@ debug string munging
@item test
full debug but no daemon
@item trace
-protocol trace
+trace RPC protocol and NFS mount arguments
@end table
@c ----------------------------------------------------------------
-@node dismount_interval Parameter, fully_qualified_hosts Parameter, debug_options Parameter, Global Parameters
+@node dismount_interval Parameter, full_os Parameter, debug_options Parameter, Global Parameters
@comment node-name, next, previous, up
@subsection @t{dismount_interval} Parameter
@cindex dismount_interval Parameter
@@ -4306,7 +4347,20 @@ protocol trace
systems that have exceeded their cached times.
@c ----------------------------------------------------------------
-@node fully_qualified_hosts Parameter, hesiod_base Parameter, dismount_interval Parameter, Global Parameters
+@node full_os Parameter, fully_qualified_hosts Parameter, dismount_interval Parameter, Global Parameters
+@comment node-name, next, previous, up
+@subsection @t{full_os} Parameter
+@cindex full_os Parameter
+
+(type=string, default to compiled in value). The full name of the
+operating system, along with its version. Allows you to override the
+compiled-in full name and version of the operating system. Useful when
+the compiled-in name is not desired. For example, the full operating
+system name on linux comes up as @samp{linux}, but you can override it
+to @samp{linux-2.2.5}.
+
+@c ----------------------------------------------------------------
+@node fully_qualified_hosts Parameter, hesiod_base Parameter, full_os Parameter, Global Parameters
@comment node-name, next, previous, up
@subsection @t{fully_qualified_hosts} Parameter
@cindex fully_qualified_hosts Parameter
@@ -4422,7 +4476,7 @@ option to @i{Amd}. Specify any logging options for @i{Amd}. Options
are comma delimited, and can be preceded by the string @samp{no} to
negate their meaning. The @samp{debug} logging option is only available
if am-utils was configured with @code{--enable-debug}. You can get the
-list of supported debugging options by running @code{amd -v}. Possible
+list of supported debugging options by running @code{amd -H}. Possible
values are:
@table @samp
@@ -4454,9 +4508,10 @@ warnings
@subsection @t{nfs_retransmit_counter} Parameter
@cindex nfs_retransmit_counter Parameter
-(type=numeric, default=110). Same as the @i{counter} part of the
-@code{-t} @i{interval.counter} option to @i{Amd}. Specifies the
-retransmit counter's value in @emph{tenths} of seconds.
+(type=numeric, default=11). Same as the @i{retransmit} part of the
+@code{-t} @i{timeout.retransmit} option to @i{Amd}. Specifies the
+number of NFS retransmissions that the kernel will use to communicate
+with @i{Amd}. @xref{-t Option}.
@c ----------------------------------------------------------------
@node nfs_retry_interval Parameter, nis_domain Parameter, nfs_retransmit_counter Parameter, Global Parameters
@@ -4464,9 +4519,17 @@ retransmit counter's value in @emph{tenths} of seconds.
@subsection @t{nfs_retry_interval} Parameter
@cindex nfs_retry_interval Parameter
-(type=numeric, default=8). Same as the @i{interval} part of the
-@code{-t} @i{interval.counter} option to @i{Amd}. Specifies the
-interval in @emph{tenths} of seconds, between NFS/RPC/UDP retries.
+(type=numeric, default=8). Same as the @i{timeout} part of the
+@code{-t} @i{timeout.retransmit} option to @i{Amd}. Specifies the NFS
+timeout interval, in @emph{tenths} of seconds, between NFS/RPC retries
+(for UDP only). This is the value that the kernel will use to
+communicate with @i{Amd}. @xref{-t Option}.
+
+Amd relies on the kernel RPC retransmit mechanism to trigger mount
+retries. The values of the @i{nfs_retransmit_counter} and the
+@i{nfs_retry_interval} parameters change the overall retry interval.
+Too long an interval gives poor interactive response; too short an
+interval causes excessive retries.
@c ----------------------------------------------------------------
@node nis_domain Parameter, normalize_hostnames Parameter, nfs_retry_interval Parameter, Global Parameters
@@ -4503,6 +4566,7 @@ backward compatibility reasons. For example, if the built-in name is
@samp{sunos5}, you can override it to @samp{sos5}, and use older maps
which were written with the latter in mind.
+
@c ----------------------------------------------------------------
@node osver Parameter, pid_file Parameter, os Parameter, Global Parameters
@comment node-name, next, previous, up
@@ -4613,7 +4677,7 @@ follows:
@end example
@c ----------------------------------------------------------------
-@node show_statfs_entries Parameter, unmount_on_exit Parameter , selectors_on_default Parameter, Global Parameters
+@node show_statfs_entries Parameter, unmount_on_exit Parameter, selectors_on_default Parameter, Global Parameters
@comment node-name, next, previous, up
@subsection @t{show_statfs_entries} Parameter
@cindex show_statfs_entries Parameter
@@ -4624,7 +4688,7 @@ browsable will also show the number of entries (keys) they have when
the @b{statfs}(2) system call).
@c ----------------------------------------------------------------
-@node unmount_on_exit Parameter, , show_statfs_entries Parameter, Global Parameters
+@node unmount_on_exit Parameter, vendor Parameter, show_statfs_entries Parameter, Global Parameters
@comment node-name, next, previous, up
@subsection @t{unmount_on_exit} Parameter
@cindex unmount_on_exit Parameter
@@ -4635,6 +4699,18 @@ all (esp. NFS) mounted file systems intact. Note that @i{Amd} does not
know about file systems mounted before it starts up, unless the
@samp{restart_mounts} option is used (@pxref{restart_mounts Parameter}).
+@c ----------------------------------------------------------------
+@node vendor Parameter, , unmount_on_exit Parameter, Global Parameters
+@comment node-name, next, previous, up
+@subsection @t{vendor} Parameter
+@cindex vendor Parameter
+
+(type=string, default to compiled in value). The name of the vendor of
+the operating system. Overrides the compiled-in vendor name. Useful
+when the compiled-in name is not desired. For example, most Intel based
+systems set the vendor name to @samp{unknown}, but you can set it to
+@samp{redhat}.
+
@c ================================================================
@node Regular Map Parameters, amd.conf Examples, Global Parameters, Amd Configuration File
@comment node-name, next, previous, up
@@ -6339,11 +6415,12 @@ the accessing user's home directory, with @i{subdir} appended to it. If
not specified, @i{subdir} defaults to @file{.hlfsdir}. This directory
will also be created if it does not already exist.
-A @samp{SIGTERM} sent to @i{Hlfsd} will cause it to shutdown. A @samp{SIGHUP} will
-flush the internal caches, and reload the password map. It will also
-close and reopen the log file, to enable the original log file to be
-removed or rotated. A @samp{SIGUSR1} will cause it to dump its internal table
-of user IDs and home directories to the file @file{/tmp/hlfsddump}.
+A @samp{SIGTERM} sent to @i{Hlfsd} will cause it to shutdown. A
+@samp{SIGHUP} will flush the internal caches, and reload the password
+map. It will also close and reopen the log file, to enable the original
+log file to be removed or rotated. A @samp{SIGUSR1} will cause it to
+dump its internal table of user IDs and home directories to the file
+@file{/tmp/hlfsddump}.
@menu
* Introduction to Hlfsd::
@@ -8063,4 +8140,4 @@ All other registered trademarks are owned by their respective owners.
@c LocalWords: serv maxgroups nfsl cachedir copt cfsadmin efs addopts fg ROMs
@c LocalWords: nointr extatt setchapternewpage columnfractions alphaev gnulibc
@c LocalWords: freebsdelf gnuoldld ifhtml defperm nodefperm norrip RRIP rrip
-@c LocalWords: noversion attr XXXXXX netgrpd
+@c LocalWords: noversion attr XXXXXX netgrpd rh mkstemp
diff --git a/contrib/amd/doc/stamp-vti b/contrib/amd/doc/stamp-vti
index 61cef7a..6032c23 100644
--- a/contrib/amd/doc/stamp-vti
+++ b/contrib/amd/doc/stamp-vti
@@ -1,3 +1,3 @@
-@set UPDATED 18 September 1999
-@set EDITION 6.0.2s2
-@set VERSION 6.0.2s2
+@set UPDATED 7 October 1999
+@set EDITION 6.0.3s1
+@set VERSION 6.0.3s1
diff --git a/contrib/amd/doc/version.texi b/contrib/amd/doc/version.texi
index 61cef7a..6032c23 100644
--- a/contrib/amd/doc/version.texi
+++ b/contrib/amd/doc/version.texi
@@ -1,3 +1,3 @@
-@set UPDATED 18 September 1999
-@set EDITION 6.0.2s2
-@set VERSION 6.0.2s2
+@set UPDATED 7 October 1999
+@set EDITION 6.0.3s1
+@set VERSION 6.0.3s1
diff --git a/contrib/amd/fsinfo/fsi_lex.l b/contrib/amd/fsinfo/fsi_lex.l
index ee223c2..545ed5c 100644
--- a/contrib/amd/fsinfo/fsi_lex.l
+++ b/contrib/amd/fsinfo/fsi_lex.l
@@ -39,7 +39,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: fsi_lex.l,v 1.2 1999/01/10 21:54:28 ezk Exp $
+ * $Id: fsi_lex.l,v 1.3 1999/09/30 21:01:41 ezk Exp $
*
*/
@@ -240,10 +240,8 @@ yyerror(char *fmt, ...)
fputc('\n', stderr);
parse_errors++;
va_end(ap);
+ if (0) unput(0);/* dummy to shut gcc up: "unput defined but not used" */
return 0;
-
- /* this call will never happen */
- unput(0);
}
diff --git a/contrib/amd/include/am_defs.h b/contrib/amd/include/am_defs.h
index ba587e6..dbf266b 100644
--- a/contrib/amd/include/am_defs.h
+++ b/contrib/amd/include/am_defs.h
@@ -1377,11 +1377,14 @@ extern u_int ualarm(u_int usecs, u_int interval);
extern int wait3(int *statusp, int options, struct rusage *rusage);
#endif /* defined(HAVE_WAIT3) && !defined(HAVE_EXTERN_WAIT3) */
+#if defined(HAVE_VSNPRINTF) && !defined(HAVE_EXTERN_VSNPRINTF)
+extern int vsnprintf(char *, int, const char *, ...);
+#endif /* defined(HAVE_VSNPRINTF) && !defined(HAVE_EXTERN_VSNPRINTF) */
+
#ifndef HAVE_EXTERN_XDR_OPAQUE_AUTH
extern bool_t xdr_opaque_auth(XDR *xdrs, struct opaque_auth *auth);
#endif /* not HAVE_EXTERN_XDR_OPAQUE_AUTH */
-
/****************************************************************************/
/*
* amd-specific header files.
diff --git a/contrib/amd/libamu/xutil.c b/contrib/amd/libamu/xutil.c
index bd1bcf5..a8b15bf 100644
--- a/contrib/amd/libamu/xutil.c
+++ b/contrib/amd/libamu/xutil.c
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: xutil.c,v 1.6 1999/09/08 23:36:53 ezk Exp $
+ * $Id: xutil.c,v 1.8 1999/09/30 21:01:42 ezk Exp $
*
*/
@@ -803,6 +803,7 @@ switch_to_logfile(char *logfile, int old_umask)
(void) fclose(logfp);
logfp = new_logfp;
+ plog(XLOG_INFO, "switched to logfile \"%s\"", logfile);
return 0;
}
diff --git a/contrib/amd/scripts/amd.conf-sample b/contrib/amd/scripts/amd.conf-sample
index 59ce1f8..9a60e2d 100644
--- a/contrib/amd/scripts/amd.conf-sample
+++ b/contrib/amd/scripts/amd.conf-sample
@@ -25,9 +25,12 @@ arch = sun4
os = sos5
# (amd -o)
osver = 2.5.1
+# full os name
+full_os = linux-2.2.5
+# OS vendor
+vendor = redhat
# if you print_version after setting up "os", it will show it. (amd -v)
print_version = yes | no
-
# (amd -l)
log_file = /var/log/amd | syslog | syslog:facility
# NFS (RPC/UDP) retry interval, in tenths of secs (amd -t interval.counter)
diff --git a/contrib/amd/scripts/amd.conf.5 b/contrib/amd/scripts/amd.conf.5
index b1edad5..ed90a6d 100644
--- a/contrib/amd/scripts/amd.conf.5
+++ b/contrib/amd/scripts/amd.conf.5
@@ -38,7 +38,7 @@
.\"
.\" %W% (Berkeley) %G%
.\"
-.\" $Id: amd.conf.5,v 1.3 1999/03/30 17:23:08 ezk Exp $
+.\" $Id: amd.conf.5,v 1.4 1999/09/30 21:01:43 ezk Exp $
.\"
.TH AMD.CONF 8 "7 August 1997"
.SH NAME
@@ -196,10 +196,11 @@ Same as the
.B \-D
option to amd. Specify any debugging options for amd. Works only if
am-utils was configured for debugging using the --enable-debug option. The
-"mem" option alone can be turned on via --enable-debug=mem. Otherwise
-debugging options are ignored. Options are comma delimited, and can be
-preceded by the string "no" to negate their meaning. You can get the list
-of supported debugging options by running amd \-v. Possible values are:
+"mem" option, as well as all other options, can be turned on via
+--enable-debug=mem. Otherwise debugging options are ignored. Options are
+comma delimited, and can be preceded by the string "no" to negate their
+meaning. You can get the list of supported debugging options by running amd
+\-H. Possible values are:
.nf
\fBall\fR all options
@@ -212,7 +213,7 @@ of supported debugging options by running amd \-v. Possible values are:
\fBmtab\fR use local "./mtab" file
\fBstr\fR debug string munging
\fBtest\fR full debug but no daemon
-\fBtrace\fR protocol trace
+\fBtrace\fR trace RPC protocol and NFS mount arguments
.fi
.TP
@@ -223,6 +224,14 @@ option to amd. Specify in seconds, the time between attempts to dismount
file systems that have exceeded their cached times.
.TP
+.BR full_os " (string, default to compiled in value)"
+The full name of the operating system, along with its version. Allows you
+to override the compiled-in full name and version of the operating system.
+Useful when the compiled-in name is not desired. For example, the full
+operating system name on linux comes up as ``linux'', but you can override
+it to ``linux-2.2.5.''
+
+.TP
.BR fully_qualified_hosts " (string, default=no)"
If "yes",
.I Amd
@@ -302,8 +311,8 @@ Same as the
option to amd. Specify any logging options for amd. Options are comma
delimited, and can be preceded by the string "no" to negate their meaning.
The "debug" logging option is only available if am-utils was configured with
---enable-debug. You can get the list of supported debugging options by
-running amd \-v. Possible values are:
+--enable-debug. You can get the list of supported debugging and logging
+options by running amd \-H. Possible values are:
.nf
\fBall\fR all messages
@@ -319,24 +328,34 @@ running amd \-v. Possible values are:
.fi
.TP
-.BR nfs_retransmit_counter " (numeric, default=110)"
+.BR nfs_retransmit_counter " (numeric, default=11)"
Same as the
-.I counter
+.I retransmit
part of the
-.BI \-t " interval.counter"
-option to amd. Specifies the retransmit counter's value in
-.I tenths
-of seconds.
+.BI \-t " timeout.retransmit"
+option to amd.
+Specifies the number of NFS retransmissions that the kernel will use to
+communicate with amd.
.TP
.BR nfs_retry_interval " (numeric, default=8)"
Same as the
-.I interval
+.I timeout
part of the
-.BI \-t " interval.counter"
-option to amd. Specifies the interval in
+.BI \-t " timeout.retransmit"
+option to amd. Specifies the NFS timeout interval, in
.I tenths
-of seconds, between NFS/RPC/UDP retries.
+of seconds, between NFS/RPC retries (for UDP only).
+This is the value that the kernel will use to
+communicate with amd.
+
+Amd relies on the kernel RPC retransmit mechanism to trigger mount retries.
+The values of the
+.B nfs_retransmit_counter
+and the
+.B nfs_retry_interval
+parameters change the overall retry interval. Too long an interval gives
+poor interactive response; too short an interval causes excessive retries.
.TP
.BR nis_domain " (string, default to local NIS domain name)"
@@ -368,7 +387,7 @@ latter in mind.
.BR osver " (string, default to compiled in value)"
Same as the
.B \-o
-option to amd. Override the compiled-in version number of the operating
+option to amd. Overrides the compiled-in version number of the operating
system. Useful when the built in version is not desired for backward
compatibility reasons. For example, if the build in version is ``2.5.1'',
you can override it to ``5.5.1'', and use older maps that were written with
@@ -465,6 +484,13 @@ unless the restart_mounts option or
.B \-r
flag are used.
+.TP
+.BR vendor " (string, default to compiled in value)"
+The name of the vendor of the operating system. Overrides the compiled-in
+vendor name. Useful when the compiled-in name is not desired. For example,
+most Intel based systems set the vendor name to ``unknown'', but you can set
+it to ``redhat.''
+
.\" **************************************************************************
.SS Parameters applicable to regular map sections
diff --git a/contrib/amd/tasks b/contrib/amd/tasks
index 942223f..976d3b2 100644
--- a/contrib/amd/tasks
+++ b/contrib/amd/tasks
@@ -38,8 +38,6 @@ Please volunteer to do any of the following:
- random nfs rhost:={srv1, srv2, srv3}
-- after cutting next release dist, check that all files are there
-
- nfslx, same as nfsl, but using linkx
- find out why this sometimes works and sometimes not:
@@ -89,3 +87,18 @@ amd.conf file (right now amd.conf overrides cmd-line options).
obvious way to check if the server supports NQNFS."
- browsable 'auto' style maps.
+
+- amq man page: amq -f also reloads maps that are not updated
+
+- mention signals in amd man page
+
+- ALLOWED_MOUNT_TIME of 40 seconds is way too long!
+- need option to turn off pings of portmapper before trying a mount
+
+- type:=program should not require umount command. can use defult
+ umount(). it works for smbmount/umount.
+
+- document var[0-7] variables/selectors
+
+- need a way to export a nfs-mount point after it is being mounted (jukebox
+ mounts). can do this with type:=program.
OpenPOWER on IntegriCloud