xref: /freebsd-12.1/contrib/amd/scripts/amd.conf.5 (revision dfd2f2d4)
1.\"
2.\" Copyright (c) 1997-2006 Erez Zadok
3.\" Copyright (c) 1990 Jan-Simon Pendry
4.\" Copyright (c) 1990 Imperial College of Science, Technology & Medicine
5.\" Copyright (c) 1990 The Regents of the University of California.
6.\" All rights reserved.
7.\"
8.\" This code is derived from software contributed to Berkeley by
9.\" Jan-Simon Pendry at Imperial College, London.
10.\"
11.\" Redistribution and use in source and binary forms, with or without
12.\" modification, are permitted provided that the following conditions
13.\" are met:
14.\" 1. Redistributions of source code must retain the above copyright
15.\"    notice, this list of conditions and the following disclaimer.
16.\" 2. Redistributions in binary form must reproduce the above copyright
17.\"    notice, this list of conditions and the following disclaimer in the
18.\"    documentation and/or other materials provided with the distribution.
19.\" 3. All advertising materials mentioning features or use of this software
20.\"    must display the following acknowledgment:
21.\"      This product includes software developed by the University of
22.\"      California, Berkeley and its contributors.
23.\" 4. Neither the name of the University nor the names of its contributors
24.\"    may be used to endorse or promote products derived from this software
25.\"    without specific prior written permission.
26.\"
27.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
28.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
31.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37.\" SUCH DAMAGE.
38.\"
39.\"	%W% (Berkeley) %G%
40.\"
41.\" $Id: amd.conf.5,v 1.39.2.5 2006/04/21 01:12:04 ezk Exp $
42.\" $FreeBSD$
43.\"
44.Dd April 21, 2006
45.Dt AMD.CONF 5
46.Os
47.Sh NAME
48.Nm amd.conf
49.Nd
50.Xr amd 8
51configuration file
52.Sh SYNOPSIS
53.Nm
54.Sh DESCRIPTION
55The
56.Nm
57file is the configuration file for
58.Xr amd 8 ,
59as part of the am-utils suite.
60.Pp
61The
62.Nm
63file
64contains runtime configuration information for the
65.Xr amd 8
66automounter program.
67.Sh FILE FORMAT
68The file consists of sections and parameters.
69A section begins with the
70name of the section in square brackets and continues until the next section
71begins or the end of the file is reached.
72Sections contain parameters of the
73form
74.Dq Ar name No = Ar value .
75.Pp
76The file is line-based \[em] that is, each newline-terminated line represents
77either a comment, a section name or a parameter.
78No line-continuation
79syntax is available.
80.Pp
81Section, parameter names and their values are case sensitive.
82.Pp
83Only the first equals sign in a parameter is significant.
84Whitespace before
85or after the first equals sign is discarded.
86Leading, trailing and
87internal whitespace in section and parameter names is irrelevant.
88Leading
89and trailing whitespace in a parameter value is discarded.
90Internal
91whitespace within a parameter value is not allowed, unless the whole
92parameter value is quoted with double quotes as in
93.Dq Ar name No = Qq Li "some\ value" .
94.Pp
95Any line beginning with a pound sign (#) is ignored, as are lines containing
96only whitespace.
97.Pp
98The values following the equals sign in parameters are all either a string
99(no quotes needed if string does not include spaces) or a boolean, which may
100be given as
101.Dq Li yes/no .
102Case is significant in all values.
103Some items such as
104cache timeouts are numeric.
105.Sh SECTIONS
106.Ss "The [global] section"
107Parameters in this section either apply to
108.Nm amd
109as a whole, or to all other
110regular map sections which follow.
111There should be only one global section
112defined in one configuration file.
113.Pp
114It is highly recommended that this section be specified first in the
115configuration file.
116If it is not, then regular map sections which precede
117it will not use global values defined later.
118.Ss "Regular [/map] sections"
119Parameters in regular (non-global) sections apply to a single map entry.
120For example, if the map section
121.Bq Pa /homes
122is defined, then all parameters following it will be applied to the
123.Pa /homes
124.Nm amd Ns
125-managed mount point.
126.Sh PARAMETERS
127.Ss "Parameters common to all sections"
128These parameters can be specified either in the global or a map specific
129section.
130Entries specified in a map-specific section override the default
131value or one defined in the global section.
132If such a common parameter is
133specified only in the global section, it is applicable to all regular map
134sections that follow.
135.Bl -tag -width 4n
136.It Va browsable_dirs Pq string, default=no
137If
138.Dq Li yes ,
139then
140.Nm amd Ns 's
141top-level mount points will be browsable to
142.Xr readdir 3
143calls.
144This means you could run for example
145.Xr ls 1
146and see what keys are available to mount in that directory.
147Not all entries
148are made visible to
149.Xr readdir 3 :
150the
151.Dq Li /default
152entry, wildcard entries, and those with a
153.Ql /
154in them are not included.
155If you specify
156.Dq Li full
157to this option, all but
158.Dq Li /default
159will be visible.
160Note that if you run a command which will attempt to
161.Xr stat 2
162the entries, such as often done by
163.Dq Li "ls -l"
164or
165.Dq Li "ls -F" ,
166.Xr amd 8
167will attempt to mount
168.Em every
169entry in that map.
170This is often called a
171.Dq "mount storm" .
172.It Va map_defaults Pq string, default no empty
173This option sets a string to be used as the map's /defaults entry,
174overriding any /defaults specified in the map.
175This allows local users to
176override map defaults without modifying maps globally.
177.It Va map_options Pq string, default no options
178This option is the same as specifying map options on the command line to
179.Xr amd 8 ,
180such as
181.Dq Li "cache:=all" .
182.It Va map_type Pq string, default search all map types
183If specified,
184.Xr amd 8
185will initialize the map only for the type given.
186This is
187useful to avoid the default map search type used by
188.Xr amd 8
189which takes longer
190and can have undesired side-effects such as initializing
191.Tn NIS
192even if not
193used.
194Possible values are:
195.Pp
196.Bl -tag -width ".Cm nisplus" -compact
197.It Cm exec
198executable maps
199.It Cm file
200plain files
201.It Cm hesiod
202Hesiod name service from MIT
203.It Cm ldap
204Lightweight Directory Access Protocol
205.It Cm ndbm
206(New) dbm style hash files
207.It Cm nis
208Network Information Services (version 2)
209.It Cm nisplus
210Network Information Services Plus (version 3)
211.It Cm passwd
212local password files
213.It Cm union
214union maps
215.El
216.It Va mount_type Pq string, default=nfs
217All
218.Xr amd 8
219mount types default to
220.Tn NFS .
221That is,
222.Xr amd 8
223is an
224.Tn NFS
225server on the
226map mount points, for the local host it is running on.
227If
228.Dq Li autofs
229is specified,
230.Xr amd 8
231will be an autofs server for those mount points.
232.It Va autofs_use_lofs Pq string, default=yes
233When set to
234.Dq Li yes
235and using Autofs,
236.Xr amd 8
237will use lofs-type (loopback) mounts
238for type:=link mounts.
239This has the advantage of mounting in place, and
240users get to the see the same pathname that they chdir'ed into.
241If this
242option is set to
243.Dq Li no ,
244then
245.Xr amd 8
246will use symlinks instead: that code is more
247tested, but negates autofs's big advantage of in-place mounts.
248.It Va search_path Pq string, default no search path
249This provides a (colon-delimited) search path for file maps.
250Using a search
251path, sites can allow for local map customizations and overrides, and can
252query
253distributed maps in several locations as needed.
254.It Va selectors_in_defaults Pq boolean, default=no
255If
256.Dq Li yes ,
257then the /defaults entry of maps will search for and process any
258selectors before setting defaults for all other keys in that map.
259Useful
260when you want to set different options for a complete map based on some
261parameters.
262For example, you may want to better the NFS performance over
263slow slip-based networks as follows:
264.Bd -literal
265/defaults \\
266	wire==slip-net;opts:=intr,rsize=1024,wsize=1024 \\
267	wire!=slip-net;opts:=intr,rsize=8192,wsize=8192
268.Ed
269Deprecated form: selectors_on_default
270.El
271.Ss "Parameters applicable to the global section only"
272.Bl -tag -width 4n
273.It Va arch Pq string, default to compiled in value
274Same as the
275.Fl A
276option to
277.Xr amd 8 .
278Allows you to override the value of the
279.Va arch
280.Xr amd 8
281variable.
282.It Va auto_attrcache Pq numeric, default=0
283Specify in seconds (or units of 0.1 seconds, depending on the OS), what is
284the (kernel-side) NFS attribute cache timeout for
285.Nm amd Ns 's
286own automount
287points.
288A value of 0 is supposed to turn off attribute caching, meaning
289that
290.Xr amd 8
291will be consulted via a kernel-RPC each time someone stat()'s
292the mount point (which could be abused as a denial-of-service attack).
293Warning: some OSs are incapable of turning off the NFS attribute cache
294reliably.
295On such systems,
296.Nm amd
297may not work reliably under heavy load.
298See
299the
300.Pa README.attrcache
301document in the Am-utils distribution for more details.
302.It Va auto_dir Pq string, default= Ns Pa /a
303Same as the
304.Fl a
305option to
306.Xr amd 8 .
307This sets the private directory where
308.Nm amd
309will create
310sub-directories for its real mount points.
311.It Va cache_duration Pq numeric, default=300
312Same as the
313.Fl c
314option to
315.Xr amd 8 .
316Sets the duration in seconds that looked-up or mounted map
317entries remain in the cache.
318.It Va cluster Pq string, default no cluster
319Same as the
320.Fl C
321option to
322.Xr amd 8 .
323Specifies the alternate
324.Tn HP-UX
325cluster to use.
326.It Va debug_mtab_file Pq string, default= Ns Pa /tmp/mnttab
327Path to mtab file that is used by
328.Xr amd 8
329to store a list of mounted
330file systems during debug-mtab mode.
331This option only applies
332to systems that store mtab information on disk.
333.It Va debug_options Pq string, default no debug options
334Same as the
335.Fl D
336option to
337.Xr amd 8 .
338Specify any debugging options for
339.Xr amd 8 .
340Works only if
341am-utils was configured for debugging using the
342.Fl Fl enable-debug
343option.
344The
345.Cm mem
346option alone can be turned on via
347.Fl Fl enable-debug Ns = Ns Cm mem .
348Otherwise debugging options are ignored.
349Options are
350comma delimited, and can be preceded by the string
351.Dq Li no
352to negate their
353meaning.
354You can get the list of supported debugging options by running
355.Nm amd Fl v .
356Possible values are:
357.Pp
358.Bl -tag -width ".Cm xdrtrace" -compact
359.It Cm all
360all options
361.It Cm amq
362register for
363.Xr amq 8
364.It Cm daemon
365enter daemon mode
366.It Cm fork
367fork server
368.It Cm full
369program trace
370.It Cm info
371info service specific debugging
372(hesiod, nis, etc.)
373.It Cm mem
374trace memory allocations
375.It Cm mtab
376use local
377.Pa ./mtab
378file
379.It Cm str
380debug string munging
381.It Cm test
382full debug but no daemon
383.It Cm trace
384trace protocol and NFS mount arguments
385.It Cm xdrtrace
386trace XDR routines
387.El
388.It Va dismount_interval Pq numeric, default=120
389Same as the
390.Fl w
391option to
392.Xr amd 8 .
393Specify, in seconds, the time between attempts to dismount
394file systems that have exceeded their cached times.
395.It Va domain_strip Pq boolean, default=yes
396If
397.Dq Li yes ,
398then the domain
399name part referred to by ${rhost} is stripped off.
400This is
401useful to keep logs and smaller.
402If
403.Dq Li no ,
404then the domain name
405part is left changed.
406This is useful when using multiple domains with
407the same maps (as you may have hosts whose domain-stripped name is
408identical).
409.It Va exec_map_timeout Pq numeric, default=10
410The timeout in seconds that
411.Xr amd 8
412will wait for an executable map program before an answer is returned from
413that program (or script).
414This value should be set to as small as possible
415while still allowing normal replies to be returned before the timer expires,
416because during the time that the executable map program is queried,
417.Xr amd 8
418is essentially waiting and is thus not responding to any other queries.
419.It Va forced_unmounts Pq boolean, default=no
420If set to
421.Dq Li yes ,
422and the client OS supports forced or lazy unmounts, then
423.Xr amd 8
424will attempt to use them if it gets any of three serious error conditions
425when trying to unmount an existing mount point or mount on top of one:
426.Er EIO , ESTALE ,
427or
428.Er EBUSY .
429.Pp
430This could be useful to recover from serious conditions such as hardware
431failure of mounted disks, or NFS servers which are down permanently, were
432migrated, or changed their IP address.
433Only
434.Dq Li type:=toplvl
435mounts hung with
436.Er EBUSY
437are forcibly unmounted using this option, which is useful to recover
438from a hung
439.Xr amd 8 ) .
440.It Va full_os Pq string, default to compiled in value
441The full name of the operating system, along with its version.
442Allows you
443to override the compiled-in full name and version of the operating system.
444Useful when the compiled-in name is not desired.
445For example, the full
446operating system name on Linux comes up as
447.Dq Li linux ,
448but you can override it to
449.Dq Li linux-2.2.5 .
450.It Va fully_qualified_hosts Pq string, default=no
451If
452.Dq Li yes ,
453.Xr amd 8
454will perform RPC authentication using fully-qualified host names.
455This is
456necessary for some systems, and especially when performing cross-domain
457mounting.
458For this function to work, the
459.Xr amd 8
460variable ${hostd} is used, requiring that ${domain} not be null.
461.It Va hesiod_base Pq string, default=automount
462Specify the base name for hesiod maps.
463.It Va karch Pq string, default to karch of the system
464Same as the
465.Fl k
466option to
467.Xr amd 8 .
468Allows you to override the kernel-architecture of your
469system.
470Useful for example on Sun (Sparc) machines, where you can build one
471.Nm amd
472binary and run it on multiple machines, yet you want each one to get
473the correct
474.Va karch
475variable set (for example, sun4c, sun4m, sun4u, etc.)
476Note that if not
477specified,
478.Xr amd 8
479will use
480.Xr uname 3
481to figure out the kernel architecture of
482the machine.
483.It Va ldap_base Pq string, default not set
484Specify the base name for LDAP.
485This often includes LDAP-specific
486values such as country and organization.
487.It Va ldap_cache_maxmem Pq numeric, default=131072
488Specify the maximum memory
489.Xr amd 8
490should use to cache LDAP entries.
491.It Va ldap_cache_seconds Pq numeric, default=0
492Specify the number of seconds to keep entries in the cache.
493.It Va ldap_hostports Pq string, default not set
494Specify the LDAP host and port values.
495.It Va ldap_proto_version Pq numeric, default=2
496Specify the version of the LDAP protocol to use.
497.It Va local_domain Pq string, default no sub-domain
498Same as the
499.Fl d
500option to
501.Xr amd 8 .
502Specify the local domain name.
503If this option is not given
504the domain name is determined from the hostname by removing the first
505component of the fully-qualified host name.
506.It Va localhost_address Pq string, default to localhost or 127.0.0.1
507Specify the name or IP address for
508.Xr amd 8
509to use when connecting the sockets
510for the local NFS server and the RPC server.
511This defaults to 127.0.0.1 or
512whatever the host reports as its local address.
513This parameter is useful on
514hosts with multiple addresses where you want to force
515.Xr amd 8
516to connect to a
517specific address.
518.It Va log_file Pq string, default= Ns Pa /dev/stderr
519Same as the
520.Fl l
521option to
522.Xr amd 8 .
523Specify a file name to log
524.Xr amd 8
525events to.
526If the string
527.Pa /dev/stderr
528is specified,
529.Xr amd 8
530will send its events to the standard error file descriptor.
531If the string
532.Pa syslog
533is given,
534.Xr amd 8
535will record its events with the system logger
536.Xr syslogd 8 .
537The default syslog facility used is
538.Dv LOG_DAEMON .
539If you
540wish to change it, append its name to the log file name, delimited by a
541single colon.
542For example, if
543.Pa logfile
544is the string
545.Dq Li syslog:local7
546then
547.Xr amd 8
548will log messages via
549.Xr syslog 3
550using the
551.Dv LOG_LOCAL7
552facility (if it exists on the system).
553.It Va log_options Pq string, default no logging options
554Same as the
555.Fl x
556option to
557.Xr amd 8 .
558Specify any logging options for
559.Xr amd 8 .
560Options are comma
561delimited, and can be preceded by the string
562.Dq Li no
563to negate their meaning.
564The
565.Dq Li debug
566logging option is only available if am-utils was configured with
567.Fl Fl enable-debug .
568You can get the list of supported debugging and logging
569options by running
570.Nm amd Fl H .
571Possible values are:
572.Pp
573.Bl -tag -width ".Cm warning" -compact
574.It Cm all
575all messages
576.It Cm debug
577debug messages
578.It Cm error
579non-fatal system errors
580.It Cm fatal
581fatal errors
582.It Cm info
583information
584.It Cm map
585map errors
586.It Cm stats
587additional statistical information
588.It Cm user
589non-fatal user errors
590.It Cm warn
591warnings
592.It Cm warning
593warnings
594.El
595.It Va map_reload_interval Pq numeric, default=3600
596The number of seconds that
597.Xr amd 8
598will wait before it checks to see if any maps
599have changed at their source (NIS servers, LDAP servers, files, etc.).
600.Xr amd 8
601will reload only those maps that have changed.
602.It Va nfs_allow_any_interface Pq string, default=no
603Normally
604.Xr amd 8
605accepts local NFS packets only from 127.0.0.1.
606If this
607parameter is set to
608.Dq Li yes
609then
610.Xr amd 8
611will accept local NFS packets from any
612local interface; this is useful on hosts that may have multiple interfaces
613where the system is forced to send all outgoing packets (even those bound to
614the same host) via an address other than 127.0.0.1.
615.It Va nfs_allow_insecure_port Pq string, default=no
616Normally
617.Xr amd 8
618will refuse requests coming from unprivileged ports (i.e.\&
619ports >= 1024 on Unix systems), so that only privileged users and the kernel
620can send NFS requests to it.
621However, some kernels (certain versions of
622Darwin, MacOS X, and Linux) have bugs that cause them to use unprivileged
623ports in certain situations, which causes
624.Xr amd 8
625to stop dead in its tracks.
626This parameter allows
627.Xr amd 8
628to operate normally even on such systems, at the
629expense of a slight decrease in the security of its operations.
630If you see
631messages like
632.Dq Li "ignoring request from foo:1234, port not reserved"
633in your
634.Xr amd 8
635log, try enabling this parameter and give it another go.
636.It Va nfs_proto Pq string, default to trying version tcp then udp
637By default,
638.Xr amd 8
639tries TCP and then UDP.
640This option forces the overall
641.Tn NFS
642protocol used to TCP or UDP.
643It overrides what is in the
644.Xr amd 8
645maps, and is
646useful when
647.Nm amd
648is compiled with NFSv3 support that may not be stable.
649With
650this option you can turn off the complete usage of NFSv3 dynamically
651(without having to recompile
652.Nm amd )
653until such time as NFSv3 support is
654desired again.
655.It Va nfs_retransmit_counter Pq numeric, default=11
656Same as the
657.Ar retransmit
658counter
659part of the
660.Fl t Ar timeout.retransmit
661option to
662.Xr amd 8 .
663Specifies the number of NFS retransmissions that the kernel will use to
664communicate with
665.Xr amd 8 .
666.It Va nfs_retransmit_counter_udp Pq numeric, default=11
667Same as the
668.Va nfs_retransmit_counter
669option, but for all UDP mounts only.
670.It Va nfs_retransmit_counter_tcp Pq numeric, default=11
671Same as the
672.Va nfs_retransmit_counter
673option, but for all TCP mounts only.
674.It Va nfs_retransmit_counter_toplvl Pq numeric, default=11
675Same as the
676.Va nfs_retransmit_counter
677option, but only for
678.Nm amd Ns 's
679top-level UDP mounts.
680.It Va nfs_retry_interval Pq numeric, default=8
681Same as the
682.Ar timeout
683interval
684part of the
685.Fl t Ar timeout.retransmit
686option to
687.Xr amd 8 .
688Specifies the
689.Tn NFS
690timeout interval, in
691.Em tenths
692of seconds, between NFS/RPC retries (for UDP and TCP).
693This is the value that the kernel will use to
694communicate with
695.Xr amd 8 .
696.Pp
697.Xr amd 8
698relies on the kernel RPC retransmit mechanism to trigger mount retries.
699The values of the
700.Va nfs_retransmit_counter
701and the
702.Va nfs_retry_interval
703parameters change the overall retry interval.
704Too long an interval gives
705poor interactive response; too short an interval causes excessive retries.
706.It Va nfs_retry_interval_udp Pq numeric, default=8
707Same as the
708.Va nfs_retry_interval
709option, but for all UDP mounts only.
710.It Va nfs_retry_interval_tcp Pq numeric, default=8
711Same as the
712.It nfs_retry_interval
713option, but for all TCP mounts only.
714.It Va nfs_retry_interval_toplvl Pq numeric, default=8
715Same as the
716.It nfs_retry_interval
717option, but only for
718.Nm amd Ns 's
719top-level UDP mounts.
720.It Va nfs_vers Pq numeric, default to trying version 3 then 2
721By default,
722.Xr amd 8
723tries version 3 and then version 2.
724This option forces the
725overall
726.Tn NFS
727protocol used to version 3 or 2.
728It overrides what is in the
729.Xr amd 8
730maps, and is useful when
731.Nm amd
732is compiled with NFSv3 support that may not
733be stable.
734With this option you can turn off the complete usage of NFSv3
735dynamically (without having to recompile
736.Nm amd )
737until such time as NFSv3
738support is desired again.
739.It Va nis_domain Pq string, default to local Tn NIS domain name
740Same as the
741.Fl y
742option to
743.Xr amd 8 .
744Specify an alternative
745.Tn NIS
746domain from which to fetch the
747.Tn NIS
748maps.
749The default is the system domain name.
750This option is ignored if
751.Tn NIS
752support is not available.
753.It Va normalize_hostnames Pq boolean, default=no
754Same as the
755.Fl n
756option to
757.Xr amd 8 .
758If
759.Dq Li yes ,
760then the name referred to by
761.Va ${rhost}
762is normalized relative to the host database before being used.
763The effect is
764to translate aliases into
765.Dq official
766names.
767.It Va normalize_slashes Pq boolean, default=yes
768If
769.Dq Li yes ,
770then
771.Xr amd 8
772will condense all multiple
773.Ql /
774(slash) characters into
775one and remove all trailing slashes.
776If
777.Dq Li no ,
778then
779.Xr amd 8
780will not touch
781strings that may contain repeated or trailing slashes.
782The latter is
783sometimes useful with SMB mounts, which often require multiple slash
784characters in pathnames.
785.It Va os Pq string, default to compiled in value
786Same as the
787.Fl O
788option to
789.Xr amd 8 .
790Allows you to override the compiled-in name of the operating
791system.
792Useful when the built-in name is not desired for backward
793compatibility reasons.
794For example, if the build in name is
795.Dq Li sunos5 ,
796you can override it to
797.Dq Li sos5 ,
798and use older maps which were written with the
799latter in mind.
800.It Va osver Pq string, default to compiled in value
801Same as the
802.Fl o
803option to
804.Xr amd 8 .
805Overrides the compiled-in version number of the operating
806system.
807Useful when the built in version is not desired for backward
808compatibility reasons.
809For example, if the build in version is
810.Dq Li 2.5.1 ,
811you can override it to
812.Dq Li 5.5.1 ,
813and use older maps that were written with
814the latter in mind.
815.It Va pid_file Pq string, default= Ns Pa /dev/stdout
816Specify a file to store the process ID of the running daemon into.
817If not
818specified,
819.Xr amd 8
820will print its process ID onto the standard output.
821Useful
822for killing
823.Xr amd 8
824after it had run.
825Note that the PID of a running
826.Nm amd
827can
828also be retrieved via
829.Nm amq Fl p .
830This file is used only if the
831.Va print_pid
832option is on.
833.It Va plock Pq boolean, default=yes
834Same as the
835.Fl S
836option to
837.Xr amd 8 .
838If
839.Dq Li yes ,
840lock the running executable pages of
841.Nm amd
842into memory.
843To improve
844.Nm amd Ns 's
845performance, systems that support the
846.Xr plock 3
847or
848.Xr mlockall 2
849call can lock the
850.Nm amd
851process into memory.
852This way there is less chance that
853the operating system will schedule, page out, and swap the
854.Nm amd
855process as needed.
856This improves
857.Nm amd Ns 's
858performance, at the cost of reserving the
859memory used by the
860.Nm amd
861process (making it unavailable for other processes).
862.It Va portmap_program Pq numeric, default=300019
863Specify an alternate Port-mapper RPC program number, other than the official
864number.
865This is useful when running multiple
866.Nm amd
867processes.
868For example,
869you can run another
870.Xr amd 8
871in
872.Dq test
873mode, without affecting the primary
874.Nm amd
875process in any way.
876For safety reasons, the alternate program numbers that
877can be specified must be in the range 300019-300029, inclusive.
878The
879.Xr amq 8
880utility
881has an option
882.Fl P
883which can be used to specify an alternate program number of an
884.Nm amd
885to contact.
886In this way,
887.Nm amq
888can fully control any number of
889.Nm amd
890processes running on the same host.
891.It Va preferred_amq_port Pq numeric, default=0
892Specify an alternate Port-mapper RPC port number for
893.Nm amd Ns 's
894.Xr amq 8
895service.
896This is used for both UDP and TCP.
897Setting this value to 0 (or
898not defining it) will cause
899.Xr amd 8
900to select an arbitrary port number.
901Setting the
902.Xr amq 8
903RPC service port to a specific number is useful in firewalled or NAT'ed
904environments, where you need to know which port
905.Xr amd 8
906will listen on.
907.It Va print_pid Pq boolean, default=no
908Same as the
909.Fl p
910option to
911.Xr amd 8 .
912If
913.Dq Li yes ,
914.Nm amd
915will print its process ID upon starting.
916.It Va print_version Pq boolean, default=no
917Same as the
918.Fl v
919option to
920.Xr amd 8 ,
921but the version prints and
922.Nm amd
923continues to run.
924If
925.Dq Li yes ,
926.Nm amd
927will print its version information string, which includes some
928configuration and compilation values.
929.It Va restart_mounts Pq boolean, default=no
930Same as the
931.Fl r
932option to
933.Xr amd 8 .
934If
935.Dq Li yes ,
936.Nm amd
937will scan the mount table to determine which file systems are currently
938mounted.
939Whenever one of these would have been auto-mounted,
940.Nm amd
941inherits it.
942.It Va show_statfs_entries Pq boolean, default=no
943If
944.Dq Li yes ,
945then all maps which are browsable will also show the number of
946entries (keys) they have when
947.Xr df 1
948runs.
949(This is accomplished by returning
950non-zero values to the
951.Xr statfs 2
952system call.)
953.It Va truncate_log Pq boolean, default=no
954If
955.Dq Li yes ,
956then the log file (if it is a regular file), will be truncated
957upon startup.
958.It Va unmount_on_exit Pq boolean, default=no
959If
960.Dq Li yes ,
961then
962.Xr amd 8
963will attempt to unmount all file systems which it knows
964about.
965Normally
966.Nm amd
967leaves all
968(esp.\&
969.Tn NFS )
970mounted file systems intact.
971Note that
972.Nm amd
973does not know about file systems mounted before it starts up,
974unless the
975.Va restart_mounts
976option or
977.Fl r
978flag are used.
979.It Va use_tcpwrappers Pq boolean, default=yes
980If
981.Dq Li yes ,
982then
983.Xr amd 8
984will use the tcpd/libwrap tcpwrappers library
985(if available) to control
986access to
987.Nm amd
988via the
989.Pa /etc/hosts.allow
990and
991.Pa /etc/hosts.deny
992files.
993.It Va vendor Pq string, default to compiled in value
994The name of the vendor of the operating system.
995Overrides the compiled-in
996vendor name.
997Useful when the compiled-in name is not desired.
998For example,
999most Intel based systems set the vendor name to
1000.Dq Li unknown ,
1001but you can set it to
1002.Dq Li redhat .
1003.El
1004.Ss "Parameters applicable to regular map sections"
1005.Bl -tag -width 4n
1006.It Va map_name Pq string, must be specified
1007Name of the map where the keys are located.
1008.It Va tag Pq string, default no tag
1009Each map entry in the configuration file can be tagged.
1010If no tag is
1011specified, that map section will always be processed by
1012.Xr amd 8 .
1013If it is
1014specified, then
1015.Nm amd
1016will process the map if the
1017.Fl T
1018option was given to
1019.Xr amd 8 ,
1020and the value given to that command-line option
1021matches that in the map section.
1022.El
1023.Sh EXAMPLES
1024Here is a real
1025.Xr amd 8
1026configuration I use daily.
1027.Bd -literal
1028# GLOBAL OPTIONS SECTION
1029[ global ]
1030normalize_hostnames =    no
1031print_pid =              no
1032restart_mounts =         yes
1033auto_dir =               /n
1034log_file =               /var/log/amd
1035log_options =            all
1036#debug_options =         all
1037plock =                  no
1038selectors_in_defaults =  yes
1039# config.guess picks up "sunos5" and I don't want to edit my maps yet
1040os =                     sos5
1041# if you print_version after setting up "os", it will show it.
1042print_version =          no
1043map_type =               file
1044search_path =            /etc/amdmaps:/usr/lib/amd:/usr/local/AMD/lib
1045browsable_dirs =         yes
1046
1047# DEFINE AN AMD MOUNT POINT
1048[ /u ]
1049map_name =               amd.u
1050
1051[ /proj ]
1052map_name =               amd.proj
1053
1054[ /src ]
1055map_name =               amd.src
1056
1057[ /misc ]
1058map_name =               amd.misc
1059
1060[ /import ]
1061map_name =               amd.import
1062
1063[ /tftpboot/.amd ]
1064tag =                    tftpboot
1065map_name =               amd.tftpboot
1066.Ed
1067.Sh SEE ALSO
1068.Xr hosts_access 5 ,
1069.Xr amd 8 ,
1070.Xr amq 8
1071.Pp
1072.Dq am-utils
1073.Xr info 1
1074entry.
1075.Rs
1076.%A Erez Zadok
1077.%B "Linux NFS and Automounter Administration"
1078.%O ISBN 0-7821-2739-8
1079.%I Sybex
1080.%D 2001
1081.Re
1082.Pp
1083.Pa http://www.am-utils.org/
1084.Rs
1085.%T Amd \- The 4.4 BSD Automounter
1086.Re
1087.Sh HISTORY
1088The
1089.Xr amd 8
1090utility first appeared in
1091.Bx 4.4 .
1092.Sh AUTHORS
1093.An Erez Zadok Aq [email protected] ,
1094Computer Science Department, Stony Brook University, Stony Brook, New York, USA.
1095.Pp
1096Other authors and contributors to am-utils are listed in the
1097.Pa AUTHORS
1098file distributed with am-utils.
1099