[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;
|
---|
| 6 |
|
---|
[0aeb696] | 7 | <!-- Inserted as a reminder to do this. The mention of a test suite
|
---|
| 8 | is usually right before the root user installation commands. Please
|
---|
| 9 | delete these 12 (including one blank) lines after you are done.-->
|
---|
| 10 |
|
---|
| 11 | <!-- Use one of the two mentions below about a test suite,
|
---|
| 12 | delete the line that is not applicable. Of course, if the
|
---|
| 13 | test suite uses syntax other than "make check", revise the
|
---|
| 14 | line to reflect the actual syntax to run the test suite -->
|
---|
| 15 |
|
---|
| 16 | <!-- <para>This package does not come with a test suite.</para> -->
|
---|
| 17 | <!-- <para>To test the results, issue: <command>make check</command>.</para> -->
|
---|
| 18 |
|
---|
[460c6edb] | 19 | <!ENTITY autofs-patch-dir "http://ftp.kernel.org/pub/linux/daemons/autofs/v4/">
|
---|
[7ef22cff] | 20 | <!ENTITY autofs-download-http "http://ftp.kernel.org/pub/linux/daemons/autofs/v4/autofs-&autofs-version;.tar.bz2">
|
---|
| 21 | <!ENTITY autofs-download-ftp "ftp://ftp.kernel.org/pub/linux/daemons/autofs/v4/autofs-&autofs-version;.tar.bz2">
|
---|
[460c6edb] | 22 | <!ENTITY autofs-md5sum "7e3949114c00665b4636f0c318179657">
|
---|
| 23 | <!ENTITY autofs-size "168 KB">
|
---|
| 24 | <!ENTITY autofs-buildsize "2.3 MB">
|
---|
| 25 | <!ENTITY autofs-time "less than 0.1 SBU">
|
---|
[7ef22cff] | 26 | ]>
|
---|
| 27 |
|
---|
| 28 | <sect1 id="autofs" xreflabel="autofs-&autofs-version;">
|
---|
[d3ad3271] | 29 | <?dbhtml filename="autofs.html"?>
|
---|
| 30 |
|
---|
| 31 | <sect1info>
|
---|
| 32 | <othername>$LastChangedBy$</othername>
|
---|
| 33 | <date>$Date$</date>
|
---|
| 34 | </sect1info>
|
---|
| 35 |
|
---|
| 36 | <title>Automate Mounting of File Systems</title>
|
---|
| 37 |
|
---|
| 38 | <indexterm zone="autofs">
|
---|
| 39 | <primary sortas="a-Autofs">Autofs</primary>
|
---|
| 40 | </indexterm>
|
---|
| 41 |
|
---|
| 42 | <sect2 role="package">
|
---|
| 43 | <title>Introduction to Autofs</title>
|
---|
| 44 |
|
---|
| 45 | <para>The <application>autofs</application> package contains userspace
|
---|
| 46 | tools that work with the kernel to mount and un-mount removable file
|
---|
[e0d33ef] | 47 | systems. This is useful for allowing users to mount floppies, cdroms and
|
---|
[d3ad3271] | 48 | other removable storage devices without requiring the system
|
---|
[e0d33ef] | 49 | administrator to mount the devices. This may not be ideal for all
|
---|
[d3ad3271] | 50 | installations, so be aware of the risks before implementing this feature.</para>
|
---|
| 51 |
|
---|
| 52 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 53 | <itemizedlist spacing="compact">
|
---|
| 54 | <listitem>
|
---|
| 55 | <para>Download (HTTP): <ulink url="&autofs-download-http;"/></para>
|
---|
| 56 | </listitem>
|
---|
| 57 | <listitem>
|
---|
| 58 | <para>Download (FTP): <ulink url="&autofs-download-ftp;"/></para>
|
---|
| 59 | </listitem>
|
---|
| 60 | <listitem>
|
---|
| 61 | <para>Download MD5 sum: &autofs-md5sum;</para>
|
---|
| 62 | </listitem>
|
---|
| 63 | <listitem>
|
---|
| 64 | <para>Download size: &autofs-size;</para>
|
---|
| 65 | </listitem>
|
---|
| 66 | <listitem>
|
---|
| 67 | <para>Estimated disk space required: &autofs-buildsize;</para>
|
---|
| 68 | </listitem>
|
---|
| 69 | <listitem>
|
---|
| 70 | <para>Estimated build time: &autofs-time;</para>
|
---|
| 71 | </listitem>
|
---|
| 72 | </itemizedlist>
|
---|
| 73 |
|
---|
| 74 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 75 | <itemizedlist spacing="compact">
|
---|
| 76 | <listitem>
|
---|
| 77 | <para>Recommended Patch: <ulink
|
---|
[765a494] | 78 | url="&patch-root;/autofs-&autofs-version;-consolidated-1.patch"/></para>
|
---|
[d3ad3271] | 79 | </listitem>
|
---|
| 80 | </itemizedlist>
|
---|
| 81 |
|
---|
[3597eb6] | 82 | <para condition="html" role="usernotes">User Notes:
|
---|
| 83 | <ulink url="&blfs-wiki;/autofs"/></para>
|
---|
| 84 |
|
---|
[d3ad3271] | 85 | </sect2>
|
---|
| 86 |
|
---|
| 87 | <sect2 role="kernel" id="autofs-kernel">
|
---|
| 88 | <title>Kernel Configuration</title>
|
---|
| 89 |
|
---|
| 90 | <indexterm zone="autofs autofs-kernel">
|
---|
| 91 | <primary sortas="d-Automounter">Automounter</primary>
|
---|
| 92 | </indexterm>
|
---|
| 93 |
|
---|
| 94 | <para>Verify that kernel support has been compiled in or built as
|
---|
| 95 | modules in the following areas:</para>
|
---|
| 96 |
|
---|
[6a0e6e4] | 97 | <screen><literal>File systems ⇒
|
---|
[e19ad480] | 98 | Kernel automounter version 4 support Y or M
|
---|
[6a0e6e4] | 99 | Network File Systems ⇒
|
---|
| 100 | NFS file system support Y or M (optional)
|
---|
| 101 | SMB file system support Y or M (optional)</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 |
|
---|
[e0d33ef] | 111 | <para>Install <application>autofs</application> by running the following
|
---|
[d3ad3271] | 112 | commands:</para>
|
---|
| 113 |
|
---|
[765a494] | 114 | <screen><userinput>patch -Np1 -i ../autofs-&autofs-version;-consolidated-1.patch &&
|
---|
[6b104248] | 115 | ./configure --prefix=/ --mandir=/usr/share/man &&
|
---|
[d3ad3271] | 116 | make</userinput></screen>
|
---|
| 117 |
|
---|
| 118 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 119 |
|
---|
| 120 | <screen role="root"><userinput>make install &&
|
---|
| 121 | rm /etc/rc.d/init.d/autofs</userinput></screen>
|
---|
| 122 |
|
---|
| 123 | </sect2>
|
---|
| 124 |
|
---|
| 125 | <sect2 role="commands">
|
---|
| 126 | <title>Command Explanations</title>
|
---|
| 127 |
|
---|
[765a494] | 128 | <para><command>patch -Np1 -i
|
---|
[9f12e36] | 129 | ../autofs-&autofs-version;-consolidated-1.patch</command>: This patch
|
---|
[765a494] | 130 | is a consolidation of nine small patches available at <ulink
|
---|
| 131 | url="http://ftp.kernel.org/pub/linux/daemons/autofs/v4/"/>. The patches
|
---|
| 132 | can be applied individually if desired.</para>
|
---|
| 133 |
|
---|
[6b104248] | 134 | <para><command>rm /etc/rc.d/init.d/autofs</command>: This command removes
|
---|
| 135 | the installed script which only works on specific distributions.</para>
|
---|
[d260aaf4] | 136 |
|
---|
[d3ad3271] | 137 | </sect2>
|
---|
[d260aaf4] | 138 |
|
---|
[d3ad3271] | 139 | <sect2 role="configuration">
|
---|
| 140 | <title>Configuring Autofs</title>
|
---|
[7ef22cff] | 141 |
|
---|
[d3ad3271] | 142 | <sect3 id="autofs-config">
|
---|
| 143 | <title>Config Files</title>
|
---|
[7ef22cff] | 144 |
|
---|
[d3ad3271] | 145 | <para><filename>/etc/sysconfig/autofs.conf</filename>,
|
---|
| 146 | <filename>/etc/auto.master</filename>,
|
---|
| 147 | <filename>/etc/auto.misc</filename>, and
|
---|
| 148 | <filename>/etc/auto.net</filename></para>
|
---|
[7ef22cff] | 149 |
|
---|
[d3ad3271] | 150 | <indexterm zone="autofs autofs-config" >
|
---|
| 151 | <primary sortas="e-etc-sysconfig-autofs.conf">/etc/sysconfig/autofs.conf</primary>
|
---|
| 152 | </indexterm>
|
---|
[7ef22cff] | 153 |
|
---|
[d3ad3271] | 154 | <indexterm zone="autofs autofs-config">
|
---|
| 155 | <primary sortas="e-etc-auto.master">/etc/auto.master</primary>
|
---|
| 156 | </indexterm>
|
---|
[7ef22cff] | 157 |
|
---|
[d3ad3271] | 158 | <indexterm zone="autofs autofs-config">
|
---|
| 159 | <primary sortas="e-etc-auto.misc">/etc/auto.misc</primary>
|
---|
| 160 | </indexterm>
|
---|
[7ef22cff] | 161 |
|
---|
[d3ad3271] | 162 | <indexterm zone="autofs autofs-config">
|
---|
| 163 | <primary sortas="e-etc-auto.net">/etc/auto.net</primary>
|
---|
| 164 | </indexterm>
|
---|
[7ef22cff] | 165 |
|
---|
[d3ad3271] | 166 | </sect3>
|
---|
[7ef22cff] | 167 |
|
---|
[d3ad3271] | 168 | <sect3>
|
---|
| 169 | <title>Configuration Information</title>
|
---|
[7ef22cff] | 170 |
|
---|
[d3ad3271] | 171 | <para>The installation process creates <filename>auto.master</filename>,
|
---|
| 172 | <filename>auto.misc</filename> and <filename>auto.net</filename>. You
|
---|
| 173 | will replace the <filename>auto.master</filename> with the following
|
---|
| 174 | commands:</para>
|
---|
| 175 |
|
---|
| 176 | <screen role="root"><userinput>mv /etc/auto.master /etc/auto.master.bak &&
|
---|
| 177 | cat > /etc/auto.master << "EOF"
|
---|
| 178 | <literal># Begin /etc/auto.master
|
---|
[7ef22cff] | 179 |
|
---|
[e19ad480] | 180 | /media /etc/auto.misc
|
---|
[7ef22cff] | 181 |
|
---|
[d3ad3271] | 182 | # End /etc/auto.master</literal>
|
---|
| 183 | EOF</userinput></screen>
|
---|
| 184 |
|
---|
| 185 | <note>
|
---|
| 186 | <para>This file mounts a new media directory over the one created by
|
---|
| 187 | LFS and will therefore hide any mounts made by the
|
---|
| 188 | <filename>fstab</filename> file into that directory.</para>
|
---|
[d612b9f] | 189 | </note>
|
---|
[d3ad3271] | 190 |
|
---|
[e0d33ef] | 191 | <para>While this package could be used to mount NFS shares and SMB
|
---|
| 192 | shares, that feature is not configured in these instructions. NFS shares
|
---|
[d3ad3271] | 193 | are covered on the next page.</para>
|
---|
| 194 |
|
---|
| 195 | <para>The <filename>auto.misc</filename> must be configured to your
|
---|
| 196 | working hardware. The loaded configuration file should load your cdrom
|
---|
| 197 | if <filename>/dev/cdrom</filename> is active or it can be edited to
|
---|
[e0d33ef] | 198 | match your device setup and examples for floppies are available in the file
|
---|
[d3ad3271] | 199 | and easily activated. Documentation for this file is available using the
|
---|
| 200 | <command>man 5 autofs</command> command.</para>
|
---|
| 201 |
|
---|
| 202 | </sect3>
|
---|
| 203 |
|
---|
| 204 | <sect3 id="autofs-init">
|
---|
| 205 | <title>Boot Script</title>
|
---|
| 206 |
|
---|
| 207 |
|
---|
[e0d33ef] | 208 | <para>Install the <filename>/etc/rc.d/init.d/autofs</filename> mount script
|
---|
| 209 | and <filename>/etc/sysconfig/autofs.conf</filename> support file included
|
---|
[5254d12] | 210 | with the <xref linkend="bootscripts"/> package.</para>
|
---|
[d3ad3271] | 211 |
|
---|
| 212 | <indexterm zone="autofs autofs-init">
|
---|
| 213 | <primary sortas="f-autofs-init">autofs</primary>
|
---|
| 214 | </indexterm>
|
---|
| 215 |
|
---|
| 216 | <screen role="root"><userinput>make install-autofs</userinput></screen>
|
---|
| 217 |
|
---|
| 218 | <para>The time-out variable is set in
|
---|
| 219 | <filename>/etc/sysconfig/autofs.conf</filename>. The installed file sets
|
---|
| 220 | a default of 60 seconds of inactivity before unmounting the device. A
|
---|
[e0d33ef] | 221 | much shorter time may be necessary to protect buffer writing to a floppy
|
---|
[d3ad3271] | 222 | if users tend to remove the media prior to the timeout setting.</para>
|
---|
| 223 |
|
---|
| 224 | </sect3>
|
---|
| 225 |
|
---|
| 226 | </sect2>
|
---|
| 227 |
|
---|
| 228 | <sect2 role="content">
|
---|
| 229 | <title>Contents</title>
|
---|
| 230 |
|
---|
| 231 | <segmentedlist>
|
---|
| 232 | <segtitle>Installed Program</segtitle>
|
---|
| 233 | <segtitle>Installed Libraries</segtitle>
|
---|
| 234 | <segtitle>Installed Directories</segtitle>
|
---|
| 235 |
|
---|
| 236 | <seglistitem>
|
---|
| 237 | <seg>automount</seg>
|
---|
| 238 | <seg>autofs modules</seg>
|
---|
[460c6edb] | 239 | <seg>/lib/autofs and /var/run/autofs</seg>
|
---|
[d3ad3271] | 240 | </seglistitem>
|
---|
| 241 | </segmentedlist>
|
---|
| 242 |
|
---|
| 243 | <variablelist>
|
---|
| 244 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 245 | <?dbfo list-presentation="list"?>
|
---|
| 246 | <?dbhtml list-presentation="table"?>
|
---|
| 247 |
|
---|
| 248 | <varlistentry id="automount">
|
---|
| 249 | <term><command>automount</command></term>
|
---|
| 250 | <listitem>
|
---|
[e0d33ef] | 251 | <para>is the daemon that performs the mounting when a request is
|
---|
[d3ad3271] | 252 | made for the device.</para>
|
---|
| 253 | <indexterm zone="autofs automount">
|
---|
| 254 | <primary sortas="b-automount">automount</primary>
|
---|
| 255 | </indexterm>
|
---|
| 256 | </listitem>
|
---|
| 257 | </varlistentry>
|
---|
| 258 |
|
---|
| 259 | </variablelist>
|
---|
| 260 |
|
---|
| 261 | </sect2>
|
---|
[7ef22cff] | 262 |
|
---|
| 263 | </sect1>
|
---|
| 264 |
|
---|