'\" te .\" Copyright (c) 2003, Sun Microsystems, Inc\&. All Rights Reserved\&. .TH rmmount.conf 4 "18 Feb 2003" "SunOS 5.10" "File Formats" .SH "NAME" rmmount.conf \- removable media mounter configuration file .SH "SYNOPSIS" .PP .nf \fB/etc/rmmount\&.conf\fR .fi .SH "DESCRIPTION" .PP The \fBrmmount\&.conf\fR file contains the \fBrmmount\fR(1M) configuration information\&. This file describes where to find shared objects that perform actions on file systems after identifying and mounting them\&. The \fBrmmount\&.conf\fR file is also used to share file systems on removable media\&. It can also direct the \fBrmmount\fR utility to run \fBfsck\fR on one or more file systems before mounting them, with the \fBfsck\fR command line options specified in \fBrmmount\&.conf\fR\&. .PP Actions are executed in the order in which they appear in the configuration file\&. The action function can return either \fB1\fR or \fB0\fR\&. If it returns \fB0\fR, no further actions will be executed\&. This allows the function to control which applications are executed\&. For example, \fBaction_filemgr\fR always returns \fB0\fR if the File Manager is running, thereby preventing subsequent actions from being executed\&. .PP To execute an action after a medium has been inserted and while the File Manager is not running, list the action after \fBaction_filemgr\fR in the \fBrmmount\&.conf\fR file\&. To execute an action before the File Manager becomes aware of the medium, list the action before \fBaction_filemgr\fR in the \fBrmmount\&.conf\fR file\&. .PP The syntax for the \fBrmmount\&.conf\fR file is as follows: .PP .nf # File system identification ident filesystem_type shared_object media_type [media_type \&.\&.\&.] # Actions action media_type shared_object args_to_so # File system sharing share media_or_file_system share_command_options # Mount command options mount media_or_file_system [file_system_spec] -o mount_command_options # Optionally fsck command options fsck media_type filesystem_type -o fsck_command_options .fi .PP Explanations of the syntax for the \fBFile system identification\fR fields are as follows: .sp .ne 2 .mk \fB\fIfilesystem_type\fR\fR .in +24n .rt An \fBASCII\fR string used as the file system type flag of the \fBmount\fR command (see the -\fBF\fR option of \fBmount\fR(1M))\&. It is also used to match names passed to \fBrmmount\fR(1M) from Volume Management\&. .sp .sp 1 .in -24n .sp .ne 2 .mk \fB\fIshared_object\fR\fR .in +24n .rt Programs that identify file systems and perform actions\&. This \fIshared_object\fR is found at \fB/usr/lib/fs/\fR\fIfilesystem_type\fR/\fIshared_object\fR\&. .sp .sp 1 .in -24n .sp .ne 2 .mk \fB\fImedia_type\fR\fR .in +24n .rt The type of medium where this file system resides\&. Legal values are \fBcdrom\fR, \fBfloppy\fR, \fBjaz\fR, \fBrmdisk\fR, and \fBzip\fR\&. .sp .sp 1 .in -24n .PP Explanations of the syntax for the \fBActions\fR fields are as follows\&. .sp .ne 2 .mk \fB\fImedia_type\fR\fR .in +16n .rt Type of medium\&. This argument is passed in from Volume Management as \fBVOLUME_TYPE\fR\&. .sp .sp 1 .in -16n .sp .ne 2 .mk \fB\fIshared_object\fR\fR .in +16n .rt Programs that identify file systems and perform actions\&. If \fIshared_object\fR starts with `/\&' (slash), the full path name is used; otherwise, \fB/usr/lib/rmmount\fR is prepended to the name\&. .sp .sp 1 .in -16n .sp .ne 2 .mk \fB\fIargs_to_so\fR\fR .in +16n .rt Arguments passed to the \fIshared_object\fR\&. These arguments are passed in as an \fIargc\fR and \fIargv\fR[]\&. .sp .sp 1 .in -16n .PP The definition of the interface to \fBActions\fR is located in \fB/usr/include/rmmount\&.h\fR\&. .PP Explanations of the syntax for the \fBFile system sharing\fR fields are as follows\&. .sp .ne 2 .mk \fB\fImedia_or_file_system\fR\fR .in +24n .rt Either the type of medium or the specific file system to share\&. .sp .sp 1 .in -24n .sp .ne 2 .mk \fB\fIshare_command_options\fR\fR .in +24n .rt Options of the \fBshare\fR command\&. See \fBshare\fR(1M) for more information about these options\&. .sp .sp 1 .in -24n .PP Explanations of the syntax for the \fBMount command options\fR fields are as follows: .sp .ne 2 .mk \fB\fImedia_or_file_system\fR\fR .in +24n .rt Either the type of medium or the specific file system to share\&. .sp .sp 1 .in -24n .sp .ne 2 .mk \fB\fIfile_system_spec\fR\fR .in +24n .rt Specifies one or more file systems to which this line applies\&. Defaults to "all" file system types\&. .sp .sp 1 .in -24n .sp .ne 2 .mk \fB\fImount_command_options\fR\fR .in +24n .rt One or more options to be passed to the \fBmount\fR command\&. Multiple options require a space delimiter\&. .sp .sp 1 .in -24n .PP Explanations of the syntax for the \fBfsck\fR command options fields are as follows: .sp .ne 2 .mk \fB\fImedia_type\fR\fR .in +24n .rt The type of removable medium\&. A Bourne shell regular expression that matches names of file system media whose aliases are listed under \fB/vol/dev/aliases\fR\&. Examples include \fBcdrom0\fR, \fBcdrom1\fR, \fBcdrom*\fR, \fBjaz0\fR, \fBjaz1\fR, and \fBjaz*\fR\&. .sp .sp 1 .in -24n .sp .ne 2 .mk \fB\fIfilesystem_type\fR\fR .in +24n .rt The type of file system, for example, \fBufs\fR or \fBhsfs\fR, that resides on the medium specified in \fImedia_type\fR\&. .sp .sp 1 .in -24n .sp .ne 2 .mk \fB\fIfsck_command_options\fR\fR .in +24n .rt One or more options to be passed to \fBfsck\fR(1M)\&. Multiple options must be separated by spaces\&. .sp .sp 1 .in -24n .PP The algorithm for the \fBfsck\fR configuration line is as follows: .br .sp 1. .mk .in +4 .rt The \fBfsck\fR configuration line tells \fBrmmount\fR to run \fBfsck\fR on \fIfilesystem_type\fR, as described above\&. The \fIfilesystem_type\fR must be correct for the \fImedia_type\fR specified\&. .sp .in -4 .br .sp 2. .mk .in +4 .rt If \fIfilesystem_type\fR is not present, \fBrmmount\fR runs \fBfsck\fR on all file systems on all media that match \fImedia_type\fR\&. .sp .in -4 .br .sp 3. .mk .in +4 .rt If \fBrmmount\&.conf\fR contains no \fBfsck\fR configuration line or contains an \fBfsck\fR configuration line with a \fImedia_type\fR that does not match a medium\&'s alias, \fBrmmount\fR does not run \fBfsck\fR on the removable medium\&'s file system, unless \fBmount\fR reports that the file system\&'s dirty bit is set\&. .sp .in -4 .SS "Default Values" .PP The following is an example of an \fBrmmount\&.conf\fR file: .PP .nf # # Removable Media Mounter configuration file\&. # # File system identification ident hsfs ident_hsfs\&.so cdrom ident ufs ident_ufs\&.so cdrom floppy rmdisk pcmem ident pcfs ident_pcfs\&.so floppy rmdisk pcmem ident udfs ident_udfs\&.so cdrom floppy # Actions action cdrom action_filemgr\&.so action floppy action_filemgr\&.so action rmdisk action_filemgr\&.so .fi .SH "EXAMPLES" .PP \fBExample 1: Sharing of Various File Systems\fR .PP The following examples show how various file systems are shared using the share syntax for the \fBrmmount\&.conf\fR file\&. These lines are added after the \fBActions\fR entries\&. .sp .ne 2 .mk \fB\fBshare\fR \fBcdrom*\fR\fR .sp .6 .in +4 Shares all CD-ROMs via NFS and applies no access restrictions\&. .sp .sp 1 .in -4 .sp .ne 2 .mk \fB\fBshare\fR \fBsolaris_2\&.x*\fR\fR .sp .6 .in +4 Shares CD-ROMs named \fBsolaris_2\&.x*\fR with no access restrictions\&. .sp .sp 1 .in -4 .sp .ne 2 .mk \fB\fBshare\fR \fBcdrom* -o ro=engineering\fR\fR .sp .6 .in +4 Shares all CD-ROMs via \fBNFS\fR but exports only to the "engineering" netgroup\&. .sp .sp 1 .in -4 .sp .ne 2 .mk \fB\fBshare\fR \fBsolaris_2\&.x* -d distribution CD\fR\fR .sp .6 .in +4 Shares CD-ROMs named solaris_2\&.x* with no access restrictions and with the description that it is a distribution CD-ROM\&. .sp .sp 1 .in -4 .sp .ne 2 .mk \fB\fBshare\fR \fBfloppy0\fR\fR .sp .6 .in +4 Shares the file system of any floppy inserted into floppy drive 0\&. .sp .sp 1 .in -4 .sp .ne 2 .mk \fB\fBshare\fR \fBjaz0\fR\fR .sp .6 .in +4 Shares the file system on Jaz drive 0\&. .sp .sp 1 .in -4 .PP \fBExample 2: Customizing \fBmount\fR Operations\fR .PP The following examples show how different \fBmount\fR options could be used to customize how \fBrmmount\fR mounts various media: .sp .ne 2 .mk \fB\fBmount\fR \fBcdrom* hsfs -o nrr\fR\fR .sp .6 .in +4 Mounts all High Sierra CD-ROMs with the \fBnrr\fR (no Rock Ridge extensions) option (see \fBmount_hsfs\fR(1M))\&. .sp .sp 1 .in -4 .sp .ne 2 .mk \fB\fBmount\fR \fBfloppy1 -o ro\fR\fR .sp .6 .in +4 Will always mount the second floppy disk read-only (for all file system types)\&. .sp .sp 1 .in -4 .sp .ne 2 .mk \fB\fBmount\fR \fBfloppy1 -o ro foldcase\fR\fR .sp .6 .in +4 Will always mount the second floppy disk read-only (for all file system types) and pass the \fBfoldcase\fR mount option\&. .sp .sp 1 .in -4 .sp .ne 2 .mk \fB\fBmount\fR \fB* pcfs -o nohidden\fR\fR .sp .6 .in +4 The \fBnohidden\fR mount option will be passed when a pcfs file system is mounted on any media type, preventing users from accessing files on the medium for which the hidden attribute is set\&. .sp .sp 1 .in -4 .sp .ne 2 .mk \fB\fBmount\fR \fBjaz1\fR -\fBo\fR \fBro\fR\fR .sp .6 .in +4 Mounts the medium in Jaz drive 1 read-only, for all file system types\&. .sp .sp 1 .in -4 .PP \fBExample 3: Telling \fBrmmount\fR to Check File Systems Before Mounting Them\fR .PP The following examples show how to tell \fBrmmount\fR to check file systems with \fBfsck\fR before mounting them, and how to specify the command line options to be used with \fBfsck\fR: .sp .ne 2 .mk \fB\fBfsck\fR \fBfloppy* ufs \(emo f\fR\fR .sp .6 .in +4 Performs a full file system check on any \fBUFS\fR floppies, ignoring the clean flag, before mounting them\&. .sp .sp 1 .in -4 .sp .ne 2 .mk \fB\fBfsck\fR \fBfloppy* ufs -o p\fR\fR .sp .6 .in +4 Uses the \fBfsck\fR \fBp\fR (preen) flag for all UFS floppies\&. .sp .sp 1 .in -4 .sp .ne 2 .mk \fB\fBfsck\fR \fBcdrom* -o f\fR\fR .sp .6 .in +4 Tells \fBrmmount\fR to run \fBfsck\fR before mounting any file system on CD-ROM\&. .sp .sp 1 .in -4 .sp .ne 2 .mk \fB\fBfsck\fR \fBjaz* ufs\fR -\fBo\fR \fBf\fR\fR .sp .6 .in +4 Tells rmmount to perform a full file system check on any \fBUFS\fR Jaz media, ignoring the clean flag, before mounting them\&. .sp .sp 1 .in -4 .SH "SEE ALSO" .PP \fBvolcancel\fR(1), \fBvolcheck\fR(1), \fBvolmissing\fR(1), \fBmount\fR(1M), \fBmount_hsfs\fR(1M), \fBrmmount\fR(1M), \fBshare\fR(1M), \fBvold\fR(1M), \fBvold\&.conf\fR(4), \fBvolfs\fR(7FS) .SH "NOTES" .PP When using the \fBmount\fR options line, verify that the specified options will work with the specified file system types\&. The \fBmount\fR command will fail if an incorrect mount option/file system combination is specified\&. Multiple \fBmount\fR options require a space delimiter\&. ...\" created by instant / solbook-to-man, Wed 22 Dec 2004, 14:35