1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 | <!ENTITY autofs-patch-dir "http://ftp.kernel.org/pub/linux/daemons/autofs/v5">
|
---|
7 | <!ENTITY autofs-download-http "http://ftp.kernel.org/pub/linux/daemons/autofs/v5/autofs-&autofs-version;.tar.bz2">
|
---|
8 | <!ENTITY autofs-download-ftp "ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/autofs-&autofs-version;.tar.bz2">
|
---|
9 | <!ENTITY autofs-md5sum "a1d262cb6ebef0c2dd0fe22232fb3d5a">
|
---|
10 | <!ENTITY autofs-size "295 KB">
|
---|
11 | <!ENTITY autofs-buildsize "5.3 MB">
|
---|
12 | <!ENTITY autofs-time "0.1 SBU">
|
---|
13 | ]>
|
---|
14 |
|
---|
15 | <sect1 id="autofs" xreflabel="Autofs-&autofs-version;">
|
---|
16 | <?dbhtml filename="autofs.html"?>
|
---|
17 |
|
---|
18 | <sect1info>
|
---|
19 | <othername>$LastChangedBy$</othername>
|
---|
20 | <date>$Date$</date>
|
---|
21 | </sect1info>
|
---|
22 |
|
---|
23 | <title>autofs-&autofs-version;</title>
|
---|
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 |
|
---|
32 | <para>The <application>Autofs</application> package contains userspace
|
---|
33 | tools that work with the kernel to mount and un-mount removable file
|
---|
34 | systems. The primary use is to mount external network file systems like
|
---|
35 | <!-- NFS (see <xref linkend="nfs-utils"/>) or -->Samba (see <xref linkend="samba3"/>)
|
---|
36 | on demand.</para>
|
---|
37 |
|
---|
38 | <para>It may also be useful for allowing users to mount floppies, cdroms and
|
---|
39 | other removable storage devices without requiring the system
|
---|
40 | administrator to mount the devices although this capability is now generally
|
---|
41 | provided by HAL (see
|
---|
42 | <ulink url="http://www.freedesktop.org/wiki/Software/hal">Hal</ulink>).
|
---|
43 | This may not be ideal for all installations, so be aware of the risks before
|
---|
44 | implementing this feature.</para>
|
---|
45 |
|
---|
46 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
47 | <itemizedlist spacing="compact">
|
---|
48 | <listitem>
|
---|
49 | <para>Download (HTTP): <ulink url="&autofs-download-http;"/></para>
|
---|
50 | </listitem>
|
---|
51 | <listitem>
|
---|
52 | <para>Download (FTP): <ulink url="&autofs-download-ftp;"/></para>
|
---|
53 | </listitem>
|
---|
54 | <listitem>
|
---|
55 | <para>Download MD5 sum: &autofs-md5sum;</para>
|
---|
56 | </listitem>
|
---|
57 | <listitem>
|
---|
58 | <para>Download size: &autofs-size;</para>
|
---|
59 | </listitem>
|
---|
60 | <listitem>
|
---|
61 | <para>Estimated disk space required: &autofs-buildsize;</para>
|
---|
62 | </listitem>
|
---|
63 | <listitem>
|
---|
64 | <para>Estimated build time: &autofs-time;</para>
|
---|
65 | </listitem>
|
---|
66 | </itemizedlist>
|
---|
67 |
|
---|
68 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
69 |
|
---|
70 | <para>Recommended Patches: There are frequent patches issued for
|
---|
71 | <application>Autofs</application>. One method you can use to get the
|
---|
72 | current patches requires first installing the <xref linkend="wget"/>
|
---|
73 | package. After ensuring the <command>wget</command> command is installed
|
---|
74 | in a directory identified in the <envar>PATH</envar> variable, start in
|
---|
75 | the same directory as the main tar file and issue the following
|
---|
76 | commands:</para>
|
---|
77 |
|
---|
78 | <screen><userinput>wget &autofs-patch-dir;/patch_order-&autofs-version; &&
|
---|
79 | sed 's;autofs;&autofs-patch-dir;/autofs;' \
|
---|
80 | patch_order-&autofs-version; | grep -v ^# > wget-list &&
|
---|
81 | wget -i wget-list</userinput></screen>
|
---|
82 |
|
---|
83 | <note><para>As of this writing, the patch list contains one patch
|
---|
84 | labelled as from the 5.0.4 series of patches.</para></note>
|
---|
85 |
|
---|
86 | <bridgehead renderas="sect3">Autofs Dependencies</bridgehead>
|
---|
87 |
|
---|
88 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
89 | <para role="optional"><xref linkend="openldap"/> and
|
---|
90 | <xref linkend="cyrus-sasl"/></para>
|
---|
91 |
|
---|
92 | <para condition="html" role="usernotes">User Notes:
|
---|
93 | <ulink url="&blfs-wiki;/autofs"/></para>
|
---|
94 |
|
---|
95 | </sect2>
|
---|
96 |
|
---|
97 | <sect2 role="kernel" id="autofs-kernel">
|
---|
98 | <title>Kernel Configuration</title>
|
---|
99 |
|
---|
100 | <indexterm zone="autofs autofs-kernel">
|
---|
101 | <primary sortas="d-Automounter">Automounter</primary>
|
---|
102 | </indexterm>
|
---|
103 |
|
---|
104 | <para>Verify that kernel support has been compiled in or built as
|
---|
105 | modules in the following areas:</para>
|
---|
106 |
|
---|
107 | <screen><literal>File systems ⇒
|
---|
108 | Kernel automounter version 4 support Y or M
|
---|
109 | Network File Systems ⇒
|
---|
110 | NFS client support Y or M (optional)
|
---|
111 | CIFS support Y or M (optional)</literal></screen>
|
---|
112 |
|
---|
113 | <para>Recompile and install the new kernel, if necessary.</para>
|
---|
114 |
|
---|
115 | </sect2>
|
---|
116 |
|
---|
117 | <sect2 role="installation">
|
---|
118 |
|
---|
119 | <title>Installation of Autofs</title>
|
---|
120 |
|
---|
121 | <para>Install <application>Autofs</application> by running the following
|
---|
122 | commands:</para>
|
---|
123 |
|
---|
124 | <screen><userinput>for f in `cat ../patch_order-&autofs-version;`; do
|
---|
125 | patch -Np1 -i ../$f
|
---|
126 | done &&
|
---|
127 | ./configure --prefix=/ --mandir=/usr/share/man &&
|
---|
128 | make</userinput></screen>
|
---|
129 |
|
---|
130 | <para>This package does not come with a test suite.</para>
|
---|
131 |
|
---|
132 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
133 |
|
---|
134 | <screen role="root"><userinput>make install &&
|
---|
135 | ln -sf ../init.d/autofs /etc/rc.d/rcsysinit.d/S52autofs</userinput></screen>
|
---|
136 |
|
---|
137 | </sect2>
|
---|
138 |
|
---|
139 | <sect2 role="commands">
|
---|
140 | <title>Command Explanations</title>
|
---|
141 |
|
---|
142 | <para><command>for f in `cat ../patch_order-&autofs-version;`; do
|
---|
143 | patch -Np1 -i ../$f; done</command>: This command applies all the
|
---|
144 | patches downloaded earlier in the correct order.</para>
|
---|
145 |
|
---|
146 | <para><command>ln -sf ../init.d/autofs
|
---|
147 | /etc/rc.d/rcsysinit.d/S52autofs</command>: This command sets the
|
---|
148 | link to properly start autofs upon boot.</para>
|
---|
149 |
|
---|
150 | </sect2>
|
---|
151 |
|
---|
152 | <sect2 role="configuration">
|
---|
153 | <title>Configuring Autofs</title>
|
---|
154 |
|
---|
155 | <sect3 id="autofs-config">
|
---|
156 | <title>Config Files</title>
|
---|
157 |
|
---|
158 | <para><filename>/etc/sysconfig/autofs.conf</filename>,
|
---|
159 | <filename>/etc/auto.master</filename>,
|
---|
160 | <filename>/etc/auto.misc</filename>, and
|
---|
161 | <filename>/etc/auto.net</filename></para>
|
---|
162 |
|
---|
163 | <indexterm zone="autofs autofs-config" >
|
---|
164 | <primary sortas="e-etc-sysconfig-autofs.conf">/etc/sysconfig/autofs.conf</primary>
|
---|
165 | </indexterm>
|
---|
166 |
|
---|
167 | <indexterm zone="autofs autofs-config">
|
---|
168 | <primary sortas="e-etc-auto.master">/etc/auto.master</primary>
|
---|
169 | </indexterm>
|
---|
170 |
|
---|
171 | <indexterm zone="autofs autofs-config">
|
---|
172 | <primary sortas="e-etc-auto.misc">/etc/auto.misc</primary>
|
---|
173 | </indexterm>
|
---|
174 |
|
---|
175 | <indexterm zone="autofs autofs-config">
|
---|
176 | <primary sortas="e-etc-auto.net">/etc/auto.net</primary>
|
---|
177 | </indexterm>
|
---|
178 |
|
---|
179 | </sect3>
|
---|
180 |
|
---|
181 | <sect3>
|
---|
182 | <title>Configuration Information</title>
|
---|
183 |
|
---|
184 | <para>The installation process creates <filename>auto.master</filename>,
|
---|
185 | <filename>auto.misc</filename>, <filename>auto.smb</filename>, and
|
---|
186 | <filename>auto.net</filename>. Replace the
|
---|
187 | <filename>auto.master</filename> file with the following commands:</para>
|
---|
188 |
|
---|
189 | <screen role="root"><userinput>mv /etc/auto.master /etc/auto.master.bak &&
|
---|
190 | cat > /etc/auto.master << "EOF"
|
---|
191 | <literal># Begin /etc/auto.master
|
---|
192 |
|
---|
193 | /media/auto /etc/auto.misc --ghost
|
---|
194 | #/home /etc/auto.home
|
---|
195 |
|
---|
196 | # End /etc/auto.master</literal>
|
---|
197 | EOF</userinput></screen>
|
---|
198 |
|
---|
199 | <para>This file creates a new media directory, <filename>/media/auto</filename>
|
---|
200 | that will overlay any existing directory of the same name. In this example,
|
---|
201 | the file, <filename>/etc/auto.misc</filename>, has a line:</para>
|
---|
202 |
|
---|
203 | <screen>cd -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom</screen>
|
---|
204 |
|
---|
205 | <para>that will mount a cdrom as <filename>/media/auto/cd</filename> if
|
---|
206 | that directory is accessed. The <option>--ghost</option> option tells
|
---|
207 | the automounter to create <quote>ghost</quote> versions (i.e. empty
|
---|
208 | directories) of all the mount points listed in the configuration file
|
---|
209 | regardless whether any of the file systems are actually mounted or not.
|
---|
210 | This is very convenient and highly recommended, because it will show you
|
---|
211 | the available auto-mountable file systems as existing directories, even
|
---|
212 | when their file systems aren't currently mounted. Without the
|
---|
213 | <option>--ghost</option> option, you'll have to remember the names of the
|
---|
214 | directories. As soon as you try to access one of them, the directory will
|
---|
215 | be created and the file system will be mounted. When the file system gets
|
---|
216 | unmounted again, the directory is destroyed too, unless the
|
---|
217 | <option>--ghost</option> option was given.</para>
|
---|
218 |
|
---|
219 | <note>
|
---|
220 | <para>An alternative method would be to specify another automount
|
---|
221 | location such as <filename
|
---|
222 | class='directory'>/var/lib/auto/cdrom</filename> and create a
|
---|
223 | symbolic link from <filename class='directory'>/media/cdrom</filename>
|
---|
224 | to the automount location.</para>
|
---|
225 | </note>
|
---|
226 |
|
---|
227 | <para>The <filename>auto.misc</filename> file must be configured to your
|
---|
228 | working hardware. The loaded configuration file should load your cdrom
|
---|
229 | if <filename>/dev/cdrom</filename> is active or it can be edited to
|
---|
230 | match your device setup. Examples for floppies are available in the file
|
---|
231 | and easily activated. Documentation for this file is available using the
|
---|
232 | <command>man 5 autofs</command> command.</para>
|
---|
233 |
|
---|
234 | <para>In the second line, if enabled, a user's home directory would be
|
---|
235 | mounted via NFS upon login. The <filename>/etc/home.auto</filename>
|
---|
236 | would need to exist and have an entry similar to:</para>
|
---|
237 |
|
---|
238 | <screen>joe example.org:/export/home/joe</screen>
|
---|
239 |
|
---|
240 | <para>where the directory <filename>/export/home/joe</filename> is
|
---|
241 | exported via NFS from the system example.org. NFS shares
|
---|
242 | are covered on the next page.</para>
|
---|
243 |
|
---|
244 | <para>This package could also be used to mount SMB shares, however that
|
---|
245 | feature is not configured in these instructions. For additional
|
---|
246 | configuration information, see the man pages for auto.master(5). There
|
---|
247 | are also web resources such as this <ulink
|
---|
248 | url='http://en.gentoo-wiki.com/wiki/Autofs'>AUTOFS
|
---|
249 | HOWTO</ulink> available.</para>
|
---|
250 |
|
---|
251 | </sect3>
|
---|
252 |
|
---|
253 | <!--
|
---|
254 | <sect3 id="autofs-init">
|
---|
255 | <title>Boot Script</title>
|
---|
256 |
|
---|
257 |
|
---|
258 | <para>Install the <filename>/etc/rc.d/init.d/autofs</filename> mount script
|
---|
259 | and <filename>/etc/sysconfig/autofs.conf</filename> support file included
|
---|
260 | with the <xref linkend="bootscripts"/> package.</para>
|
---|
261 |
|
---|
262 | <indexterm zone="autofs autofs-init">
|
---|
263 | <primary sortas="f-autofs-init">autofs</primary>
|
---|
264 | </indexterm>
|
---|
265 |
|
---|
266 | <screen role="root"><userinput>make install-autofs</userinput></screen>
|
---|
267 |
|
---|
268 | <para>The time-out variable is set in
|
---|
269 | <filename>/etc/sysconfig/autofs.conf</filename>. The installed file sets
|
---|
270 | a default of 60 seconds of inactivity before unmounting the device. A
|
---|
271 | much shorter time may be necessary to protect buffer writing to a floppy
|
---|
272 | if users tend to remove the media prior to the timeout setting.</para>
|
---|
273 |
|
---|
274 | </sect3>
|
---|
275 | -->
|
---|
276 |
|
---|
277 | </sect2>
|
---|
278 |
|
---|
279 | <sect2 role="content">
|
---|
280 | <title>Contents</title>
|
---|
281 |
|
---|
282 | <segmentedlist>
|
---|
283 | <segtitle>Installed Program</segtitle>
|
---|
284 | <segtitle>Installed Libraries</segtitle>
|
---|
285 | <segtitle>Installed Directories</segtitle>
|
---|
286 |
|
---|
287 | <seglistitem>
|
---|
288 | <seg>automount</seg>
|
---|
289 | <seg>lookup_file.so, lookup_hosts.so, lookup_multi.so,
|
---|
290 | lookup_nisplus.so, lookup_program.so, lookup_userhome.so,
|
---|
291 | lookup_yp.so, mount_afs.so, mount_autofs.so, mount_bind.so,
|
---|
292 | mount_changer.so, mount_ext2.so, mount_generic.so,
|
---|
293 | mount_nfs.so, parse_sun.so</seg>
|
---|
294 | <seg>/lib/autofs and /var/run/autofs</seg>
|
---|
295 | </seglistitem>
|
---|
296 | </segmentedlist>
|
---|
297 |
|
---|
298 | <variablelist>
|
---|
299 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
300 | <?dbfo list-presentation="list"?>
|
---|
301 | <?dbhtml list-presentation="table"?>
|
---|
302 |
|
---|
303 | <varlistentry id="automount">
|
---|
304 | <term><command>automount</command></term>
|
---|
305 | <listitem>
|
---|
306 | <para>is the daemon that performs the mounting when a request is
|
---|
307 | made for the device.</para>
|
---|
308 | <indexterm zone="autofs automount">
|
---|
309 | <primary sortas="b-automount">automount</primary>
|
---|
310 | </indexterm>
|
---|
311 | </listitem>
|
---|
312 | </varlistentry>
|
---|
313 |
|
---|
314 | </variablelist>
|
---|
315 |
|
---|
316 | </sect2>
|
---|
317 |
|
---|
318 | </sect1>
|
---|