2004-10-19 04:26:04 +08:00
|
|
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
2007-04-05 03:42:53 +08:00
|
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
2004-10-19 04:26:04 +08:00
|
|
|
<!ENTITY % general-entities SYSTEM "../../general.ent">
|
|
|
|
%general-entities;
|
2008-03-08 12:20:33 +08:00
|
|
|
<!ENTITY autofs-patch-dir "http://ftp.kernel.org/pub/linux/daemons/autofs/v5">
|
|
|
|
<!ENTITY autofs-download-http "http://ftp.kernel.org/pub/linux/daemons/autofs/v5/autofs-&autofs-version;.tar.bz2">
|
2008-04-09 23:40:36 +08:00
|
|
|
<!ENTITY autofs-download-ftp "ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/autofs-&autofs-version;.tar.bz2">
|
2010-03-08 08:53:18 +08:00
|
|
|
<!ENTITY autofs-md5sum "a1d262cb6ebef0c2dd0fe22232fb3d5a">
|
|
|
|
<!ENTITY autofs-size "295 KB">
|
|
|
|
<!ENTITY autofs-buildsize "5.3 MB">
|
|
|
|
<!ENTITY autofs-time "0.1 SBU">
|
2004-10-19 04:26:04 +08:00
|
|
|
]>
|
|
|
|
|
2008-04-09 23:40:36 +08:00
|
|
|
<sect1 id="autofs" xreflabel="Autofs-&autofs-version;">
|
2005-05-13 03:51:44 +08:00
|
|
|
<?dbhtml filename="autofs.html"?>
|
|
|
|
|
|
|
|
<sect1info>
|
|
|
|
<othername>$LastChangedBy$</othername>
|
|
|
|
<date>$Date$</date>
|
|
|
|
</sect1info>
|
|
|
|
|
2011-11-04 07:05:47 +08:00
|
|
|
<title>autofs-&autofs-version;</title>
|
2005-05-13 03:51:44 +08:00
|
|
|
|
|
|
|
<indexterm zone="autofs">
|
|
|
|
<primary sortas="a-Autofs">Autofs</primary>
|
|
|
|
</indexterm>
|
|
|
|
|
|
|
|
<sect2 role="package">
|
|
|
|
<title>Introduction to Autofs</title>
|
|
|
|
|
2008-04-09 23:40:36 +08:00
|
|
|
<para>The <application>Autofs</application> package contains userspace
|
2005-05-13 03:51:44 +08:00
|
|
|
tools that work with the kernel to mount and un-mount removable file
|
2008-03-08 12:20:33 +08:00
|
|
|
systems. The primary use is to mount external network file systems like
|
2011-11-10 01:37:35 +08:00
|
|
|
<!-- NFS (see <xref linkend="nfs-utils"/>) or -->Samba (see <xref linkend="samba3"/>)
|
2008-03-08 12:20:33 +08:00
|
|
|
on demand.</para>
|
2008-05-09 20:42:27 +08:00
|
|
|
|
2008-03-08 12:20:33 +08:00
|
|
|
<para>It may also be useful for allowing users to mount floppies, cdroms and
|
2005-05-13 03:51:44 +08:00
|
|
|
other removable storage devices without requiring the system
|
2008-03-08 12:20:33 +08:00
|
|
|
administrator to mount the devices although this capability is now generally
|
|
|
|
provided by HAL (see <xref linkend="hal"/>). This may not be ideal for all
|
2005-05-13 03:51:44 +08:00
|
|
|
installations, so be aware of the risks before implementing this feature.</para>
|
|
|
|
|
|
|
|
<bridgehead renderas="sect3">Package Information</bridgehead>
|
|
|
|
<itemizedlist spacing="compact">
|
|
|
|
<listitem>
|
|
|
|
<para>Download (HTTP): <ulink url="&autofs-download-http;"/></para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>Download (FTP): <ulink url="&autofs-download-ftp;"/></para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>Download MD5 sum: &autofs-md5sum;</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>Download size: &autofs-size;</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>Estimated disk space required: &autofs-buildsize;</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>Estimated build time: &autofs-time;</para>
|
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
|
|
|
|
<bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
2008-04-09 23:40:36 +08:00
|
|
|
|
2008-08-12 04:01:52 +08:00
|
|
|
<para>Recommended Patches: There are frequent patches issued for
|
|
|
|
<application>Autofs</application>. One method you can use to get the
|
|
|
|
current patches requires first installing the <xref linkend="wget"/>
|
|
|
|
package. After ensuring the <command>wget</command> command is installed
|
|
|
|
in a directory identified in the <envar>PATH</envar> variable, start in
|
|
|
|
the same directory as the main tar file and issue the following
|
|
|
|
commands:</para>
|
2008-05-09 20:42:27 +08:00
|
|
|
|
2008-03-08 12:20:33 +08:00
|
|
|
<screen><userinput>wget &autofs-patch-dir;/patch_order-&autofs-version; &&
|
2008-04-09 23:40:36 +08:00
|
|
|
sed 's;autofs;&autofs-patch-dir;/autofs;' \
|
2010-03-08 08:53:18 +08:00
|
|
|
patch_order-&autofs-version; | grep -v ^# > wget-list &&
|
2008-03-08 12:20:33 +08:00
|
|
|
wget -i wget-list</userinput></screen>
|
2008-05-09 20:42:27 +08:00
|
|
|
|
2010-03-08 08:53:18 +08:00
|
|
|
<note><para>As of this writing, the patch list contains one patch
|
|
|
|
labelled as from the 5.0.4 series of patches.</para></note>
|
|
|
|
|
2008-04-15 16:34:07 +08:00
|
|
|
<bridgehead renderas="sect3">Autofs Dependencies</bridgehead>
|
2008-04-15 11:40:11 +08:00
|
|
|
|
2008-04-15 16:34:07 +08:00
|
|
|
<bridgehead renderas="sect4">Optional</bridgehead>
|
|
|
|
<para role="optional"><xref linkend="openldap"/> and
|
|
|
|
<xref linkend="cyrus-sasl"/></para>
|
2008-04-15 11:40:11 +08:00
|
|
|
|
2006-04-11 02:38:22 +08:00
|
|
|
<para condition="html" role="usernotes">User Notes:
|
|
|
|
<ulink url="&blfs-wiki;/autofs"/></para>
|
|
|
|
|
2005-05-13 03:51:44 +08:00
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="kernel" id="autofs-kernel">
|
|
|
|
<title>Kernel Configuration</title>
|
|
|
|
|
|
|
|
<indexterm zone="autofs autofs-kernel">
|
|
|
|
<primary sortas="d-Automounter">Automounter</primary>
|
|
|
|
</indexterm>
|
|
|
|
|
|
|
|
<para>Verify that kernel support has been compiled in or built as
|
|
|
|
modules in the following areas:</para>
|
|
|
|
|
2006-05-06 10:51:35 +08:00
|
|
|
<screen><literal>File systems ⇒
|
2005-12-08 02:47:32 +08:00
|
|
|
Kernel automounter version 4 support Y or M
|
2006-05-06 10:51:35 +08:00
|
|
|
Network File Systems ⇒
|
2010-03-08 08:53:18 +08:00
|
|
|
NFS client support Y or M (optional)
|
|
|
|
CIFS support Y or M (optional)</literal></screen>
|
2005-05-31 00:03:52 +08:00
|
|
|
|
2005-05-13 03:51:44 +08:00
|
|
|
<para>Recompile and install the new kernel, if necessary.</para>
|
2004-10-19 04:26:04 +08:00
|
|
|
|
2005-05-13 03:51:44 +08:00
|
|
|
</sect2>
|
2005-01-15 08:30:04 +08:00
|
|
|
|
2005-05-13 03:51:44 +08:00
|
|
|
<sect2 role="installation">
|
2005-05-31 00:03:52 +08:00
|
|
|
|
2005-05-13 03:51:44 +08:00
|
|
|
<title>Installation of Autofs</title>
|
|
|
|
|
2008-04-09 23:40:36 +08:00
|
|
|
<para>Install <application>Autofs</application> by running the following
|
2005-05-13 03:51:44 +08:00
|
|
|
commands:</para>
|
|
|
|
|
2008-05-09 21:00:42 +08:00
|
|
|
<screen><userinput>for f in `cat ../patch_order-&autofs-version;`; do
|
2008-03-08 12:20:33 +08:00
|
|
|
patch -Np1 -i ../$f
|
|
|
|
done &&
|
2005-08-10 22:45:40 +08:00
|
|
|
./configure --prefix=/ --mandir=/usr/share/man &&
|
2005-05-13 03:51:44 +08:00
|
|
|
make</userinput></screen>
|
|
|
|
|
2008-03-08 12:20:33 +08:00
|
|
|
<para>This package does not come with a test suite.</para>
|
|
|
|
|
2005-05-13 03:51:44 +08:00
|
|
|
<para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
|
|
|
|
|
|
|
<screen role="root"><userinput>make install &&
|
2008-04-11 10:58:10 +08:00
|
|
|
ln -sf ../init.d/autofs /etc/rc.d/rcsysinit.d/S52autofs</userinput></screen>
|
2005-05-13 03:51:44 +08:00
|
|
|
|
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="commands">
|
|
|
|
<title>Command Explanations</title>
|
|
|
|
|
2008-03-08 12:20:33 +08:00
|
|
|
<para><command>for f in `cat ../patch_order-&autofs-version;`; do
|
2008-05-09 21:00:42 +08:00
|
|
|
patch -Np1 -i ../$f; done</command>: This command applies all the
|
2008-08-12 04:01:52 +08:00
|
|
|
patches downloaded earlier in the correct order.</para>
|
2006-05-13 00:46:22 +08:00
|
|
|
|
2008-05-09 21:00:42 +08:00
|
|
|
<para><command>ln -sf ../init.d/autofs
|
|
|
|
/etc/rc.d/rcsysinit.d/S52autofs</command>: This command sets the
|
2008-03-08 12:20:33 +08:00
|
|
|
link to properly start autofs upon boot.</para>
|
2005-01-31 01:59:50 +08:00
|
|
|
|
2005-05-13 03:51:44 +08:00
|
|
|
</sect2>
|
2005-01-31 01:59:50 +08:00
|
|
|
|
2005-05-13 03:51:44 +08:00
|
|
|
<sect2 role="configuration">
|
|
|
|
<title>Configuring Autofs</title>
|
2004-10-19 04:26:04 +08:00
|
|
|
|
2005-05-13 03:51:44 +08:00
|
|
|
<sect3 id="autofs-config">
|
|
|
|
<title>Config Files</title>
|
2004-10-19 04:26:04 +08:00
|
|
|
|
2005-05-13 03:51:44 +08:00
|
|
|
<para><filename>/etc/sysconfig/autofs.conf</filename>,
|
|
|
|
<filename>/etc/auto.master</filename>,
|
|
|
|
<filename>/etc/auto.misc</filename>, and
|
|
|
|
<filename>/etc/auto.net</filename></para>
|
2004-10-19 04:26:04 +08:00
|
|
|
|
2005-05-13 03:51:44 +08:00
|
|
|
<indexterm zone="autofs autofs-config" >
|
|
|
|
<primary sortas="e-etc-sysconfig-autofs.conf">/etc/sysconfig/autofs.conf</primary>
|
|
|
|
</indexterm>
|
2004-10-19 04:26:04 +08:00
|
|
|
|
2005-05-13 03:51:44 +08:00
|
|
|
<indexterm zone="autofs autofs-config">
|
|
|
|
<primary sortas="e-etc-auto.master">/etc/auto.master</primary>
|
|
|
|
</indexterm>
|
2004-10-19 04:26:04 +08:00
|
|
|
|
2005-05-13 03:51:44 +08:00
|
|
|
<indexterm zone="autofs autofs-config">
|
|
|
|
<primary sortas="e-etc-auto.misc">/etc/auto.misc</primary>
|
|
|
|
</indexterm>
|
2004-10-19 04:26:04 +08:00
|
|
|
|
2005-05-13 03:51:44 +08:00
|
|
|
<indexterm zone="autofs autofs-config">
|
|
|
|
<primary sortas="e-etc-auto.net">/etc/auto.net</primary>
|
|
|
|
</indexterm>
|
2004-10-19 04:26:04 +08:00
|
|
|
|
2005-05-13 03:51:44 +08:00
|
|
|
</sect3>
|
2004-10-19 04:26:04 +08:00
|
|
|
|
2005-05-13 03:51:44 +08:00
|
|
|
<sect3>
|
|
|
|
<title>Configuration Information</title>
|
2004-10-19 04:26:04 +08:00
|
|
|
|
2005-05-13 03:51:44 +08:00
|
|
|
<para>The installation process creates <filename>auto.master</filename>,
|
2008-03-08 12:20:33 +08:00
|
|
|
<filename>auto.misc</filename>, <filename>auto.smb</filename>, and
|
2008-04-09 23:40:36 +08:00
|
|
|
<filename>auto.net</filename>. Replace the
|
|
|
|
<filename>auto.master</filename> file with the following commands:</para>
|
2005-05-13 03:51:44 +08:00
|
|
|
|
|
|
|
<screen role="root"><userinput>mv /etc/auto.master /etc/auto.master.bak &&
|
|
|
|
cat > /etc/auto.master << "EOF"
|
|
|
|
<literal># Begin /etc/auto.master
|
2004-10-19 04:26:04 +08:00
|
|
|
|
2008-03-27 13:35:35 +08:00
|
|
|
/media/auto /etc/auto.misc --ghost
|
|
|
|
#/home /etc/auto.home
|
2004-10-19 04:26:04 +08:00
|
|
|
|
2005-05-13 03:51:44 +08:00
|
|
|
# End /etc/auto.master</literal>
|
|
|
|
EOF</userinput></screen>
|
|
|
|
|
2008-03-27 13:35:35 +08:00
|
|
|
<para>This file creates a new media directory, <filename>/media/auto</filename>
|
|
|
|
that will overlay any existing directory of the same name. In this example,
|
|
|
|
the file, <filename>/etc/auto.misc</filename>, has a line:</para>
|
|
|
|
|
|
|
|
<screen>cd -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom</screen>
|
|
|
|
|
|
|
|
<para>that will mount a cdrom as <filename>/media/auto/cd</filename> if
|
|
|
|
that directory is accessed. The <option>--ghost</option> option tells
|
2008-04-09 23:40:36 +08:00
|
|
|
the automounter to create <quote>ghost</quote> versions (i.e. empty
|
|
|
|
directories) of all the mount points listed in the configuration file
|
|
|
|
regardless whether any of the file systems are actually mounted or not.
|
|
|
|
This is very convenient and highly recommended, because it will show you
|
|
|
|
the available auto-mountable file systems as existing directories, even
|
|
|
|
when their file systems aren't currently mounted. Without the
|
|
|
|
<option>--ghost</option> option, you'll have to remember the names of the
|
|
|
|
directories. As soon as you try to access one of them, the directory will
|
|
|
|
be created and the file system will be mounted. When the file system gets
|
|
|
|
unmounted again, the directory is destroyed too, unless the
|
|
|
|
<option>--ghost</option> option was given.</para>
|
2008-03-27 13:35:35 +08:00
|
|
|
|
2005-05-13 03:51:44 +08:00
|
|
|
<note>
|
2008-03-27 13:35:35 +08:00
|
|
|
<para>An alternative method would be to specify another automount
|
2008-04-09 23:40:36 +08:00
|
|
|
location such as <filename
|
|
|
|
class='directory'>/var/lib/auto/cdrom</filename> and create a
|
|
|
|
symbolic link from <filename class='directory'>/media/cdrom</filename>
|
|
|
|
to the automount location.</para>
|
2005-05-31 00:03:52 +08:00
|
|
|
</note>
|
2005-05-13 03:51:44 +08:00
|
|
|
|
2008-03-27 13:35:35 +08:00
|
|
|
<para>The <filename>auto.misc</filename> file must be configured to your
|
2005-05-13 03:51:44 +08:00
|
|
|
working hardware. The loaded configuration file should load your cdrom
|
|
|
|
if <filename>/dev/cdrom</filename> is active or it can be edited to
|
2008-03-27 13:35:35 +08:00
|
|
|
match your device setup. Examples for floppies are available in the file
|
2005-05-13 03:51:44 +08:00
|
|
|
and easily activated. Documentation for this file is available using the
|
|
|
|
<command>man 5 autofs</command> command.</para>
|
|
|
|
|
2008-03-27 13:35:35 +08:00
|
|
|
<para>In the second line, if enabled, a user's home directory would be
|
|
|
|
mounted via NFS upon login. The <filename>/etc/home.auto</filename>
|
|
|
|
would need to exist and have an entry similar to:</para>
|
|
|
|
|
|
|
|
<screen>joe example.org:/export/home/joe</screen>
|
|
|
|
|
|
|
|
<para>where the directory <filename>/export/home/joe</filename> is
|
|
|
|
exported via NFS from the system example.org. NFS shares
|
|
|
|
are covered on the next page.</para>
|
|
|
|
|
2008-04-09 23:40:36 +08:00
|
|
|
<para>This package could also be used to mount SMB shares, however that
|
|
|
|
feature is not configured in these instructions. For additional
|
|
|
|
configuration information, see the man pages for auto.master(5). There
|
2008-03-27 13:35:35 +08:00
|
|
|
are also web resources such as this <ulink
|
2010-01-06 03:37:14 +08:00
|
|
|
url='http://en.gentoo-wiki.com/wiki/Autofs'>AUTOFS
|
2008-04-09 23:40:36 +08:00
|
|
|
HOWTO</ulink> available.</para>
|
2008-03-27 13:35:35 +08:00
|
|
|
|
2005-05-13 03:51:44 +08:00
|
|
|
</sect3>
|
2008-04-09 23:40:36 +08:00
|
|
|
|
2008-03-08 12:20:33 +08:00
|
|
|
<!--
|
2005-05-13 03:51:44 +08:00
|
|
|
<sect3 id="autofs-init">
|
|
|
|
<title>Boot Script</title>
|
|
|
|
|
|
|
|
|
2005-05-31 05:56:30 +08:00
|
|
|
<para>Install the <filename>/etc/rc.d/init.d/autofs</filename> mount script
|
|
|
|
and <filename>/etc/sysconfig/autofs.conf</filename> support file included
|
2005-12-29 09:38:36 +08:00
|
|
|
with the <xref linkend="bootscripts"/> package.</para>
|
2005-05-13 03:51:44 +08:00
|
|
|
|
|
|
|
<indexterm zone="autofs autofs-init">
|
|
|
|
<primary sortas="f-autofs-init">autofs</primary>
|
|
|
|
</indexterm>
|
|
|
|
|
|
|
|
<screen role="root"><userinput>make install-autofs</userinput></screen>
|
|
|
|
|
|
|
|
<para>The time-out variable is set in
|
|
|
|
<filename>/etc/sysconfig/autofs.conf</filename>. The installed file sets
|
|
|
|
a default of 60 seconds of inactivity before unmounting the device. A
|
2005-05-31 05:56:30 +08:00
|
|
|
much shorter time may be necessary to protect buffer writing to a floppy
|
2005-05-13 03:51:44 +08:00
|
|
|
if users tend to remove the media prior to the timeout setting.</para>
|
|
|
|
|
|
|
|
</sect3>
|
2008-03-08 12:20:33 +08:00
|
|
|
-->
|
2008-04-09 23:40:36 +08:00
|
|
|
|
2005-05-13 03:51:44 +08:00
|
|
|
</sect2>
|
|
|
|
|
|
|
|
<sect2 role="content">
|
|
|
|
<title>Contents</title>
|
|
|
|
|
|
|
|
<segmentedlist>
|
|
|
|
<segtitle>Installed Program</segtitle>
|
|
|
|
<segtitle>Installed Libraries</segtitle>
|
|
|
|
<segtitle>Installed Directories</segtitle>
|
|
|
|
|
|
|
|
<seglistitem>
|
|
|
|
<seg>automount</seg>
|
2008-03-08 12:20:33 +08:00
|
|
|
<seg>lookup_file.so, lookup_hosts.so, lookup_multi.so,
|
|
|
|
lookup_nisplus.so, lookup_program.so, lookup_userhome.so,
|
|
|
|
lookup_yp.so, mount_afs.so, mount_autofs.so, mount_bind.so,
|
2008-05-09 21:00:42 +08:00
|
|
|
mount_changer.so, mount_ext2.so, mount_generic.so,
|
2008-03-08 12:20:33 +08:00
|
|
|
mount_nfs.so, parse_sun.so</seg>
|
2005-06-15 00:24:48 +08:00
|
|
|
<seg>/lib/autofs and /var/run/autofs</seg>
|
2005-05-13 03:51:44 +08:00
|
|
|
</seglistitem>
|
|
|
|
</segmentedlist>
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
|
|
|
<?dbfo list-presentation="list"?>
|
|
|
|
<?dbhtml list-presentation="table"?>
|
|
|
|
|
|
|
|
<varlistentry id="automount">
|
|
|
|
<term><command>automount</command></term>
|
|
|
|
<listitem>
|
2005-05-31 05:56:30 +08:00
|
|
|
<para>is the daemon that performs the mounting when a request is
|
2005-05-13 03:51:44 +08:00
|
|
|
made for the device.</para>
|
|
|
|
<indexterm zone="autofs automount">
|
|
|
|
<primary sortas="b-automount">automount</primary>
|
|
|
|
</indexterm>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
</sect2>
|
2004-10-19 04:26:04 +08:00
|
|
|
|
|
|
|
</sect1>
|