The autofs package contains userspace tools that work with the kernel to mount and un-mount removable file systems. This is useful for allowing users to mount floppies, cdroms and other removable storage devices without requiring the system administrator to mount the devices. This may not be ideal for all installations, so be aware of the risks before implementing this feature.
Download (HTTP): http://ftp.kernel.org/pub/linux/daemons/autofs/v4/autofs-4.1.3.tar.bz2
Download (FTP): ftp://ftp.kernel.org/pub/linux/daemons/autofs/v4/autofs-4.1.3.tar.bz2
Download MD5 sum: f43a09e94c4bd512ec58ac06e9d42c60
Download size: 122 KB
Estimated disk space required: 1.4 MB
Estimated build time: 0.01 SBU
Recommended Patch: http://ftp.kernel.org/pub/linux/daemons/autofs/v4/autofs-4.1.3-strict.patch
Recommended Patch: http://ftp.kernel.org/pub/linux/daemons/autofs/v4/autofs-4.1.3-bad_chdir.patch
Recommended Patch: http://ftp.kernel.org/pub/linux/daemons/autofs/v4/autofs-4.1.3-mtab_lock.patch
Recommended Patch: http://ftp.kernel.org/pub/linux/daemons/autofs/v4/autofs-4.1.3-non_block_ping.patch
Recommended Patch: http://ftp.kernel.org/pub/linux/daemons/autofs/v4/autofs-4.1.3-signal-race-fix.patch
Recommended Patch: http://ftp.kernel.org/pub/linux/daemons/autofs/v4/autofs-4.1.3-sock-leak-fix.patch
Recommended Patch: http://ftp.kernel.org/pub/linux/daemons/autofs/v4/autofs-4.1.3-replicated_server_select.patch
Recommended Patch: http://ftp.kernel.org/pub/linux/daemons/autofs/v4/autofs-4.1.3-multi-over.patch
Verify that kernel support has been compiled in or built as modules in the following areas:
File systems Kernel automounter version 4 support Y or M Network File Systems NFS file system support Y or M SMB file system support Y or M
Recompile and install the new kernel, if necessary.
Install autofs by running the following commands:
patch -Np1 -i ../autofs-4.1.3-strict.patch &&
patch -Np1 -i ../autofs-4.1.3-bad_chdir.patch &&
patch -Np1 -i ../autofs-4.1.3-mtab_lock.patch &&
patch -Np1 -i ../autofs-4.1.3-non_block_ping.patch &&
patch -Np1 -i ../autofs-4.1.3-signal-race-fix.patch &&
patch -Np1 -i ../autofs-4.1.3-sock-leak-fix.patch &&
patch -Np1 -i ../autofs-4.1.3-replicated_server_select.patch &&
patch -Np1 -i ../autofs-4.1.3-multi-over.patch &&
./configure --prefix=/ --mandir=/usr/share/man &&
make
Now, as the root user:
make install &&
rm /etc/rc.d/init.d/autofs
rm /etc/rc.d/init.d/autofs: This command removes the installed script which only works on specific distributions.
The installation process creates auto.master, auto.misc and auto.net. You will replace the auto.master with the following commands.
mv /etc/auto.master /etc/auto.master.bak && cat > /etc/auto.master << "EOF" # Begin /etc/auto.master /media /etc/auto.misc # End /etc/auto.master EOF
This file mounts a new media directory over the one created by LFS and will therefore hide any mounts made by the fstab file into that directory.
While this package could be used to mount NFS shares and SMB shares, that feature is not configured in these instructions. NFS shares are covered on the next page.
The auto.misc must be configured to your working hardware. The loaded configuration file should load your cdrom if /dev/cdrom is active or it can be edited to match your device setup and examples for floppies are available in the file and easily activated. Documentation for this file is available using the man 5 autofs command.
Install the /etc/rc.d/init.d/autofs mount script and /etc/sysconfig/autofs.conf support file included with the blfs-bootscripts-6.0 package.
make install-autofs
The time-out variable is set in /etc/sysconfig/autofs.conf. The installed file sets a default of 60 seconds of inactivity before unmounting the device. A much shorter time may be necessary to protect buffer writing to a floppy if users tend to remove the media prior to the timeout setting.
Last updated on 2005-02-09 14:53:24 -0700