[7ef22cff] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[7ef22cff] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
[d17b13d] | 6 |
|
---|
[6172f21] | 7 | <!ENTITY autofs-download-http "http://www.kernel.org/pub/linux/daemons/autofs/v5/autofs-&autofs-version;.tar.xz">
|
---|
[47be189b] | 8 | <!ENTITY autofs-download-ftp "ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/autofs-&autofs-version;.tar.xz">
|
---|
[9fe905c] | 9 | <!ENTITY autofs-md5sum "889c9d2f0e76f08ae0ff0d206f119098">
|
---|
[3e072580] | 10 | <!ENTITY autofs-size "284 KB">
|
---|
[9fe905c] | 11 | <!ENTITY autofs-buildsize "11 MB">
|
---|
[5e7ffd30] | 12 | <!ENTITY autofs-time "0.1 SBU">
|
---|
[7ef22cff] | 13 | ]>
|
---|
| 14 |
|
---|
[32d0e29] | 15 | <sect1 id="autofs" xreflabel="Autofs-&autofs-version;">
|
---|
[d3ad3271] | 16 | <?dbhtml filename="autofs.html"?>
|
---|
| 17 |
|
---|
| 18 | <sect1info>
|
---|
| 19 | <othername>$LastChangedBy$</othername>
|
---|
| 20 | <date>$Date$</date>
|
---|
| 21 | </sect1info>
|
---|
| 22 |
|
---|
[6d15c62] | 23 | <title>autofs-&autofs-version;</title>
|
---|
[d3ad3271] | 24 |
|
---|
| 25 | <indexterm zone="autofs">
|
---|
| 26 | <primary sortas="a-Autofs">Autofs</primary>
|
---|
| 27 | </indexterm>
|
---|
| 28 |
|
---|
| 29 | <sect2 role="package">
|
---|
| 30 | <title>Introduction to Autofs</title>
|
---|
| 31 |
|
---|
[d17b13d] | 32 | <para>
|
---|
| 33 | <application>Autofs</application> controls the operation of the automount
|
---|
| 34 | daemons. The automount daemons automatically mount filesystems when they
|
---|
| 35 | are accessed and unmount them after a period of inactivity. This is done
|
---|
| 36 | based on a set of pre-configured maps.
|
---|
| 37 | </para>
|
---|
[47be189b] | 38 |
|
---|
[64eb9189] | 39 | &lfs77_checked; &gcc5_checked;
|
---|
[d3ad3271] | 40 |
|
---|
| 41 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 42 | <itemizedlist spacing="compact">
|
---|
| 43 | <listitem>
|
---|
| 44 | <para>Download (HTTP): <ulink url="&autofs-download-http;"/></para>
|
---|
| 45 | </listitem>
|
---|
| 46 | <listitem>
|
---|
| 47 | <para>Download (FTP): <ulink url="&autofs-download-ftp;"/></para>
|
---|
| 48 | </listitem>
|
---|
| 49 | <listitem>
|
---|
| 50 | <para>Download MD5 sum: &autofs-md5sum;</para>
|
---|
| 51 | </listitem>
|
---|
| 52 | <listitem>
|
---|
| 53 | <para>Download size: &autofs-size;</para>
|
---|
| 54 | </listitem>
|
---|
| 55 | <listitem>
|
---|
| 56 | <para>Estimated disk space required: &autofs-buildsize;</para>
|
---|
| 57 | </listitem>
|
---|
| 58 | <listitem>
|
---|
| 59 | <para>Estimated build time: &autofs-time;</para>
|
---|
| 60 | </listitem>
|
---|
| 61 | </itemizedlist>
|
---|
[fd7e0ed6] | 62 |
|
---|
[81066706] | 63 | <bridgehead renderas="sect3">Autofs Dependencies</bridgehead>
|
---|
[50d1a60] | 64 |
|
---|
[d17b13d] | 65 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 66 | <para role="optional">
|
---|
| 67 | <xref linkend="libtirpc"/>,
|
---|
| 68 | <xref linkend="nfs-utils"/>,
|
---|
| 69 | <xref linkend="libxml2"/>,
|
---|
| 70 | <xref linkend="mitkrb"/>,
|
---|
| 71 | <xref linkend="openldap"/> (client only), and
|
---|
| 72 | <xref linkend="cyrus-sasl"/>
|
---|
| 73 | </para>
|
---|
[50d1a60] | 74 |
|
---|
[3597eb6] | 75 | <para condition="html" role="usernotes">User Notes:
|
---|
| 76 | <ulink url="&blfs-wiki;/autofs"/></para>
|
---|
| 77 |
|
---|
[d3ad3271] | 78 | </sect2>
|
---|
| 79 |
|
---|
| 80 | <sect2 role="kernel" id="autofs-kernel">
|
---|
| 81 | <title>Kernel Configuration</title>
|
---|
| 82 |
|
---|
| 83 | <indexterm zone="autofs autofs-kernel">
|
---|
| 84 | <primary sortas="d-Automounter">Automounter</primary>
|
---|
| 85 | </indexterm>
|
---|
| 86 |
|
---|
[d17b13d] | 87 | <para>
|
---|
| 88 | Verify that automounter kernel support has been enabled:
|
---|
| 89 | </para>
|
---|
| 90 |
|
---|
| 91 | <screen><literal>File systems --->
|
---|
[38155d1] | 92 | <*/M> Kernel automounter version 4 support (also supports v3) [CONFIG_AUTOFS4_FS]</literal></screen>
|
---|
[d17b13d] | 93 |
|
---|
| 94 | <para>
|
---|
| 95 | Optionally, enable the following options in the kernel configuration:
|
---|
| 96 | </para>
|
---|
[d3ad3271] | 97 |
|
---|
[d17b13d] | 98 | <screen><literal>File systems --->
|
---|
[38155d1] | 99 | [*] Network File Systems ---> [CONFIG_NETWORK_FILESYSTEMS]
|
---|
| 100 | <*/M> NFS client support [CONFIG_NFS_FS]
|
---|
| 101 | <*/M> CIFS support (advanced network filesystem, SMBFS successor) [CONFIG_CIFS]</literal></screen>
|
---|
[d612b9f] | 102 |
|
---|
[d3ad3271] | 103 | <para>Recompile and install the new kernel, if necessary.</para>
|
---|
[7ef22cff] | 104 |
|
---|
[d3ad3271] | 105 | </sect2>
|
---|
[0290a023] | 106 |
|
---|
[d3ad3271] | 107 | <sect2 role="installation">
|
---|
[d612b9f] | 108 |
|
---|
[d3ad3271] | 109 | <title>Installation of Autofs</title>
|
---|
| 110 |
|
---|
[32d0e29] | 111 | <para>Install <application>Autofs</application> by running the following
|
---|
[d3ad3271] | 112 | commands:</para>
|
---|
[d17b13d] | 113 |
|
---|
[9fe905c] | 114 | <screen><userinput>./configure --prefix=/ \
|
---|
[73b53eb] | 115 | --without-openldap \
|
---|
| 116 | --mandir=/usr/share/man &&
|
---|
[d3ad3271] | 117 | make</userinput></screen>
|
---|
| 118 |
|
---|
[d4bf650a] | 119 | <para>This package does not come with a test suite.</para>
|
---|
| 120 |
|
---|
[d3ad3271] | 121 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 122 |
|
---|
[47be189b] | 123 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
[d3ad3271] | 124 |
|
---|
| 125 | </sect2>
|
---|
[d17b13d] | 126 |
|
---|
[d3ad3271] | 127 | <sect2 role="commands">
|
---|
| 128 | <title>Command Explanations</title>
|
---|
| 129 |
|
---|
[d17b13d] | 130 | <para>
|
---|
| 131 | <option>--with-libtirpc</option>: This switch enables libtirpc support if
|
---|
| 132 | available.
|
---|
| 133 | </para>
|
---|
[d260aaf4] | 134 |
|
---|
[73b53eb] | 135 | <para>
|
---|
[9fe905c] | 136 | <option>--without-openldap</option>: This switch disables openldap if
|
---|
| 137 | found. If openldap is desired, omit this switch. Note that openldap
|
---|
| 138 | support in autofs requires <xref linkend="mitkrb"/>.
|
---|
[73b53eb] | 139 | </para>
|
---|
| 140 |
|
---|
[d3ad3271] | 141 | </sect2>
|
---|
[d17b13d] | 142 |
|
---|
[d3ad3271] | 143 | <sect2 role="configuration">
|
---|
| 144 | <title>Configuring Autofs</title>
|
---|
[7ef22cff] | 145 |
|
---|
[d3ad3271] | 146 | <sect3 id="autofs-config">
|
---|
| 147 | <title>Config Files</title>
|
---|
[7ef22cff] | 148 |
|
---|
[d3ad3271] | 149 | <para><filename>/etc/sysconfig/autofs.conf</filename>,
|
---|
| 150 | <filename>/etc/auto.master</filename>,
|
---|
| 151 | <filename>/etc/auto.misc</filename>, and
|
---|
| 152 | <filename>/etc/auto.net</filename></para>
|
---|
[7ef22cff] | 153 |
|
---|
[d3ad3271] | 154 | <indexterm zone="autofs autofs-config" >
|
---|
| 155 | <primary sortas="e-etc-sysconfig-autofs.conf">/etc/sysconfig/autofs.conf</primary>
|
---|
| 156 | </indexterm>
|
---|
[7ef22cff] | 157 |
|
---|
[d3ad3271] | 158 | <indexterm zone="autofs autofs-config">
|
---|
| 159 | <primary sortas="e-etc-auto.master">/etc/auto.master</primary>
|
---|
| 160 | </indexterm>
|
---|
[7ef22cff] | 161 |
|
---|
[d3ad3271] | 162 | <indexterm zone="autofs autofs-config">
|
---|
| 163 | <primary sortas="e-etc-auto.misc">/etc/auto.misc</primary>
|
---|
| 164 | </indexterm>
|
---|
[7ef22cff] | 165 |
|
---|
[d3ad3271] | 166 | <indexterm zone="autofs autofs-config">
|
---|
| 167 | <primary sortas="e-etc-auto.net">/etc/auto.net</primary>
|
---|
| 168 | </indexterm>
|
---|
[7ef22cff] | 169 |
|
---|
[d3ad3271] | 170 | </sect3>
|
---|
[7ef22cff] | 171 |
|
---|
[d3ad3271] | 172 | <sect3>
|
---|
| 173 | <title>Configuration Information</title>
|
---|
[7ef22cff] | 174 |
|
---|
[d3ad3271] | 175 | <para>The installation process creates <filename>auto.master</filename>,
|
---|
[d4bf650a] | 176 | <filename>auto.misc</filename>, <filename>auto.smb</filename>, and
|
---|
[32d0e29] | 177 | <filename>auto.net</filename>. Replace the
|
---|
[69243a9] | 178 | <filename>auto.master</filename> file with the following commands
|
---|
| 179 | as the <systemitem class="username">root</systemitem> user:</para>
|
---|
[d3ad3271] | 180 |
|
---|
| 181 | <screen role="root"><userinput>mv /etc/auto.master /etc/auto.master.bak &&
|
---|
| 182 | cat > /etc/auto.master << "EOF"
|
---|
| 183 | <literal># Begin /etc/auto.master
|
---|
[7ef22cff] | 184 |
|
---|
[9415459] | 185 | /media/auto /etc/auto.misc --ghost
|
---|
| 186 | #/home /etc/auto.home
|
---|
[7ef22cff] | 187 |
|
---|
[d3ad3271] | 188 | # End /etc/auto.master</literal>
|
---|
| 189 | EOF</userinput></screen>
|
---|
| 190 |
|
---|
[9415459] | 191 | <para>This file creates a new media directory, <filename>/media/auto</filename>
|
---|
| 192 | that will overlay any existing directory of the same name. In this example,
|
---|
| 193 | the file, <filename>/etc/auto.misc</filename>, has a line:</para>
|
---|
| 194 |
|
---|
| 195 | <screen>cd -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom</screen>
|
---|
| 196 |
|
---|
| 197 | <para>that will mount a cdrom as <filename>/media/auto/cd</filename> if
|
---|
| 198 | that directory is accessed. The <option>--ghost</option> option tells
|
---|
[32d0e29] | 199 | the automounter to create <quote>ghost</quote> versions (i.e. empty
|
---|
| 200 | directories) of all the mount points listed in the configuration file
|
---|
| 201 | regardless whether any of the file systems are actually mounted or not.
|
---|
| 202 | This is very convenient and highly recommended, because it will show you
|
---|
| 203 | the available auto-mountable file systems as existing directories, even
|
---|
| 204 | when their file systems aren't currently mounted. Without the
|
---|
| 205 | <option>--ghost</option> option, you'll have to remember the names of the
|
---|
| 206 | directories. As soon as you try to access one of them, the directory will
|
---|
| 207 | be created and the file system will be mounted. When the file system gets
|
---|
| 208 | unmounted again, the directory is destroyed too, unless the
|
---|
| 209 | <option>--ghost</option> option was given.</para>
|
---|
[9415459] | 210 |
|
---|
[d3ad3271] | 211 | <note>
|
---|
[9415459] | 212 | <para>An alternative method would be to specify another automount
|
---|
[32d0e29] | 213 | location such as <filename
|
---|
| 214 | class='directory'>/var/lib/auto/cdrom</filename> and create a
|
---|
| 215 | symbolic link from <filename class='directory'>/media/cdrom</filename>
|
---|
| 216 | to the automount location.</para>
|
---|
[d612b9f] | 217 | </note>
|
---|
[d3ad3271] | 218 |
|
---|
[9415459] | 219 | <para>The <filename>auto.misc</filename> file must be configured to your
|
---|
[d3ad3271] | 220 | working hardware. The loaded configuration file should load your cdrom
|
---|
| 221 | if <filename>/dev/cdrom</filename> is active or it can be edited to
|
---|
[9415459] | 222 | match your device setup. Examples for floppies are available in the file
|
---|
[d3ad3271] | 223 | and easily activated. Documentation for this file is available using the
|
---|
| 224 | <command>man 5 autofs</command> command.</para>
|
---|
| 225 |
|
---|
[9415459] | 226 | <para>In the second line, if enabled, a user's home directory would be
|
---|
| 227 | mounted via NFS upon login. The <filename>/etc/home.auto</filename>
|
---|
| 228 | would need to exist and have an entry similar to:</para>
|
---|
| 229 |
|
---|
| 230 | <screen>joe example.org:/export/home/joe</screen>
|
---|
| 231 |
|
---|
| 232 | <para>where the directory <filename>/export/home/joe</filename> is
|
---|
| 233 | exported via NFS from the system example.org. NFS shares
|
---|
| 234 | are covered on the next page.</para>
|
---|
| 235 |
|
---|
[32d0e29] | 236 | <para>This package could also be used to mount SMB shares, however that
|
---|
| 237 | feature is not configured in these instructions. For additional
|
---|
| 238 | configuration information, see the man pages for auto.master(5). There
|
---|
[9415459] | 239 | are also web resources such as this <ulink
|
---|
[f22f1ef3] | 240 | url='http://wiki.gentoo.org/wiki/Autofs'>AUTOFS
|
---|
[32d0e29] | 241 | HOWTO</ulink> available.</para>
|
---|
[9415459] | 242 |
|
---|
[d3ad3271] | 243 | </sect3>
|
---|
[32d0e29] | 244 |
|
---|
[d3ad3271] | 245 | <sect3 id="autofs-init">
|
---|
| 246 | <title>Boot Script</title>
|
---|
| 247 |
|
---|
[601a838] | 248 | <para> <application>autofs</application> installs its own boot script,
|
---|
[47be189b] | 249 | but it has no capability for logging or visual conformance with other
|
---|
| 250 | BLFS scripts.</para>
|
---|
[d3ad3271] | 251 |
|
---|
[47be189b] | 252 | <para>Install the <filename>/etc/init.d/autofs</filename> mount script
|
---|
| 253 | included with the <xref linkend="bootscripts"/> package.</para>
|
---|
[d3ad3271] | 254 |
|
---|
| 255 | <indexterm zone="autofs autofs-init">
|
---|
| 256 | <primary sortas="f-autofs-init">autofs</primary>
|
---|
| 257 | </indexterm>
|
---|
| 258 |
|
---|
| 259 | <screen role="root"><userinput>make install-autofs</userinput></screen>
|
---|
| 260 |
|
---|
| 261 | <para>The time-out variable is set in
|
---|
| 262 | <filename>/etc/sysconfig/autofs.conf</filename>. The installed file sets
|
---|
| 263 | a default of 60 seconds of inactivity before unmounting the device. A
|
---|
[e0d33ef] | 264 | much shorter time may be necessary to protect buffer writing to a floppy
|
---|
[d3ad3271] | 265 | if users tend to remove the media prior to the timeout setting.</para>
|
---|
| 266 |
|
---|
| 267 | </sect3>
|
---|
[32d0e29] | 268 |
|
---|
[d3ad3271] | 269 | </sect2>
|
---|
| 270 |
|
---|
| 271 | <sect2 role="content">
|
---|
| 272 | <title>Contents</title>
|
---|
| 273 |
|
---|
| 274 | <segmentedlist>
|
---|
| 275 | <segtitle>Installed Program</segtitle>
|
---|
| 276 | <segtitle>Installed Libraries</segtitle>
|
---|
| 277 | <segtitle>Installed Directories</segtitle>
|
---|
| 278 |
|
---|
| 279 | <seglistitem>
|
---|
| 280 | <seg>automount</seg>
|
---|
[9fe905c] | 281 | <seg>
|
---|
| 282 | lookup_dir.so, lookup_file.so, lookup_files.so, lookup_hosts.so,
|
---|
| 283 | lookup_ldap.so, lookup_multi.so, lookup_nis.so, lookup_nisplus.so,
|
---|
| 284 | lookup_program.so, lookup_userhome.so, lookup_yp.so, mount_afs.so,
|
---|
| 285 | mount_autofs.so, mount_bind.so, mount_changer.so, mount_ext2.so,
|
---|
| 286 | mount_ext3.so, mount_ext4.so, mount_generic.so, mount_nfs.so,
|
---|
| 287 | mount_nfs4.so, parse_amd.so, and parse_sun.so
|
---|
| 288 | </seg>
|
---|
[47be189b] | 289 | <seg>/lib/autofs</seg>
|
---|
[d3ad3271] | 290 | </seglistitem>
|
---|
| 291 | </segmentedlist>
|
---|
| 292 |
|
---|
| 293 | <variablelist>
|
---|
| 294 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 295 | <?dbfo list-presentation="list"?>
|
---|
| 296 | <?dbhtml list-presentation="table"?>
|
---|
| 297 |
|
---|
| 298 | <varlistentry id="automount">
|
---|
| 299 | <term><command>automount</command></term>
|
---|
| 300 | <listitem>
|
---|
[e0d33ef] | 301 | <para>is the daemon that performs the mounting when a request is
|
---|
[d3ad3271] | 302 | made for the device.</para>
|
---|
| 303 | <indexterm zone="autofs automount">
|
---|
| 304 | <primary sortas="b-automount">automount</primary>
|
---|
| 305 | </indexterm>
|
---|
| 306 | </listitem>
|
---|
| 307 | </varlistentry>
|
---|
| 308 |
|
---|
| 309 | </variablelist>
|
---|
| 310 |
|
---|
| 311 | </sect2>
|
---|
[7ef22cff] | 312 |
|
---|
| 313 | </sect1>
|
---|