text: System Administration Commands－第 1 单元
  hal-find-by-capability(1M)
  System Administration Commands－第 2 单元
  System Administration Commands－第 3 单元
  -. The autofs file system monitors attempts to access directories within it and notifies the automountd(1M) daemon. The daemon uses the map to locate a file system, which it then mounts at the point of reference within the autofs file system. A map can be assigned to an autofs mount using an entry in the /etc/auto_master map or a direct map.
  If the file system is not accessed within an appropriate interval (10 minutes by default), the automountd daemon unmounts the file system.
  The file /etc/auto_master determines the locations of all autofs mount points. By default, this file contains three entries:
  # Master map for automounter # +auto_master /net -hosts -nosuid /home auto_home
  The +auto_master entry is a reference to an external NIS master map. If one exists, then its entries are read as if they occurred in place of the +auto_master entry. The remaining entries in the master file specify a directory on which an autofs mount will be made followed by the automounter map to be associated with it. Optional mount options may be supplied as an optional third field in the each the direct map, or to perform unmounts for entries that have been removed from these maps..
  Startup autofs SMF parameters for automount can be manipulated using sharectl(1M). Refer to sharectl(1M) for instructions for viewing and updating these parameters. Supported parameters are:.
  If a system is configured with Oracle Solaris Trusted Extensions, users have home directories at each label within their clearance. Therefore a home directory needs to be available in each corresponding labeled zone. Instead of using the auto_home map, a special map is automatically generated, using the zone's name as a suffix. By default the map contains the single entry:
  -fstype=lofs :/export/home/&
  When a home directory is referenced and the name does not match any other keys in the zone's auto_home_zonename map, it will match this loopback mount specification. If this loopback match occurs and the name corresponds to a valid user whose home directory does not exist in the zone, the directory is automatically created on behalf of the user.
  It is also possible to share home directories in a zone, in read-only mode, with higher-level zones, using NFS. In this case, the higher-level zone needs to have an automap entry for each lower-level zone that is to be imported. A typical map entry for the public zone, to be interpreted in the internal zone, would be called auto_home_public, and would look like this:
  +auto_home_public public-zone-IP-address:/export/home/&
  This automap entry would then be included in /etc/auto_master, as follows:
  /zone/public/home auto_home_public -nobrowse
  Users in higher-level zones can use the updatehome(1) utility to synchronize specific startup files using their minimum labeled zone as the source.
  The following options are supported:
  Specifies a duration, in seconds, that a file system is to remain mounted when not in use. The default is 10 minutes.
  Verbose mode. Notifies of autofs mounts, unmounts, or other non-essential information. absolute pathname of the directory to mount.
  Options to other file systems are documented on the other mount_* reference manual pages, for example, mount_nfs(1M).
  Multiple location fields can be specified for replicated NFS file systems, in which case automount and the kernel will each try to use that information to increase availability. If the read-only flag is set in the map entry, automountd mounts a list of locations that the kernel may use, sorted by several criteria. Only locations available at mount time will be mounted, and thus be available to the kernel. When a server does not respond, the kernel will switch to an alternate server. The sort ordering of automount is used to determine how the next server is chosen. If the read-only flag is not set, automount will mount the best single location, chosen by the same sort ordering, and new servers will only be chosen when an unmount has been possible, and a remount is done. Servers on the same local subnet are given the strongest preference, and servers on the local net are given the second strongest preference. Among servers equally far away, response times will determine the order if no weighting factors (see below) are used.
  If the list includes server locations using both the NFS Version 2 Protocol and the NFS Version 3 Protocol, automount will choose only a subset of the server locations on the list, so that all entries will be the same protocol. It will choose servers with the NFS Version 3 Protocol so long as an NFS Version 2 Protocol server on a local subnet will not be ignored. See the 《系统管理指南：IP 服务》 for additional details. are assumed to have a value of zero (most likely to be selected). Progressively higher values decrease the chance of being selected. In the example,
  man -ro alpha,bravo,charlie(1),delta(4) : /usr/man
  hosts alpha and bravo have the highest priority; host delta has the lowest.. The automounter always selects the localhost over other servers on the same network segment, regardless of weighting.
  In cases where each server has a different export point, the weighting can still be applied..
  The ampersand (&) character is expanded to the value of the key field for the entry in which it occurs. In this case:.
  Client specific variables can be used within an automount map. For instance, if $HOST appeared within a map, automount would expand it to its current value for the client's host name. Supported variables are:If a reference needs to be protected from affixed characters, you can surround the variable name with curly braces ( { } ). exist on the server under beta. automount will automatically mount /src/beta, /src/beta/1.0, and /src/beta/1.0/man, as needed, from either svr1 or svr2, whichever host is nearest and responds first.
  The automounter assumes NFS mounts as a default file system type. Other file system types can be described using the fstype mount option. Other mount options specific to this file system type can be combined with the fstype option. The location field must contain information specific to the file system type. If the location field begins with a slash, a colon character must be prepended, for instance, to mount a CD file system:
  cdrom -fstype=hsfs,ro : /dev/sr0
  or to perform an autofs mount:
  src -fstype=autofs auto_src
  Use this procedure only if you are not using Volume Manager.
  See the NOTES section for information on option inheritance.
  An indirect map allows you to specify mappings for the subdirectories you wish to mount under the directory indicated on the command line. In an indirect map, each key consists of a simple name that refers to one or more file systems that are to be mounted as needed.
  Entries in a direct map are associated directly with autofs mount points. Each key is the full pathname of an autofs mount point. The direct map as a whole is not associated with any single directory.
  If mapname begins with a slash, it is assumed to be the pathname of a local file. Otherwise, the location of the map is determined by the policy of the name service switch according to the entry for the automounter in /etc/nsswitch.conf, such as
  automount: files nis
  If the name service is files, then the name is assumed to be that of a local file in /etc. If the key being searched for is not found in the included map, the search continues with the next entry.
  There are three special maps available: -hosts, -fedfs.
  The -fedfs map is used with the /nfs4 directory and assumes that the map key is the DNS domain for which the domain root filesystem is needed. The automountd daemon looks up the domain root servers with a query equivalent to:
  % nslookup -q=srv _nfs4._domainroot._tcp.domain
  ...and mounts server-list:/.domainroot-domain at /nfs4/domain.
  This supports the pending IETF standard documented in:\ draft-ietf-nfsv4-federated-fs-dns-srv-namespace/
  The -null map cancels a previous map for the directory indicated. This is most useful in the /etc/auto_master for cancelling entries that would otherwise be inherited from the +auto_master include entry. To be effective, the -null entries must be inserted before the included map entry.
  Local maps that have the execute bit set in their file permissions will be executed by the automounter and provided with a key to be looked up as an argument. The executable map is expected to return the content of an automounter map entry on its stdout or no output if the entry cannot be determined. A direct map cannot be made executable..
  The automount daemon supports.
  Name service switch configuration file. See nsswitch.conf(4).
  See attributes(5) for descriptions of the following attributes:
  isainfo(1), ls(1), svcs(1), uname(1), updatehome(1), automountd(1M), mount(1M), mount_nfs(1M), sharectl(1M), svcadm(1M), attributes(5), nfssec(5), smf(5)
  autofs mount points must not be hierarchically related. automount does not allow an autofs mount point to be created within another autofs mount.
  Since each direct map entry results in a new autofs mount such maps should be kept short..
  As of the Solaris 2.6 release, a listing (see ls(1)) of the autofs directory associated with an indirect map shows all potential mountable entries. The attributes associated with the potential mountable entries are temporary. The real file system attributes will only be shown once the file system has been mounted.
  Default mount options can be assigned to an entire map when specified as an optional third field in the master map. These options apply only to map entries that have no mount options. Note that map entities with options override the default options, as at this time, the options do not concatenate. The concatenation feature is planned for a future release.
  When operating on a map that invokes an NFS mount, the default number of retries for the automounter is 0, that is, a single mount attempt, with no retries. Note that this is significantly different from the default (10000) for the mount_nfs(1M) utility.
  The Network Information Service (NIS) was formerly known as Sun Yellow Pages (YP). The functionality of the two remains the same.