|
The rmmount.conf file contains the rmmount(1M) configuration information.
This file describes where to find shared objects that perform actions on file systems after identifying and mounting them. The rmmount.conf file is also used to share file systems on removable media. It can also direct the rmmount utility to run fsck
on one or more file systems before mounting them, with the fsck command line options specified in rmmount.conf.
Actions are executed in the order in which they appear in the configuration file. The action function can return either 1 or 0. If it returns 0, no further actions will be executed. This allows the function to control which applications are
executed. For example, action_filemgr always returns 0 if the File Manager is running, thereby preventing subsequent actions from being executed.
To execute an action after a medium has been inserted and while the File Manager is not running, list the action after action_filemgr in the rmmount.conf file. To execute an action before the File Manager becomes aware of the medium, list the action before action_filemgr in the rmmount.conf file.
The syntax for the rmmount.conf file is as follows:
|
# 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
|
Explanations of the syntax for the File system identification fields are as follows:
-
filesystem_type
- An ASCII string used as the file system type flag of the mount command (see the -F option of mount(1M)). It is also used to match names passed to rmmount(1M)
from Volume Management.
-
shared_object
- Programs that identify file systems and perform actions. This shared_object is found at /usr/lib/fs/filesystem_type/shared_object.
-
media_type
- The type of medium where this file system resides. Legal values are cdrom, floppy, jaz, rmdisk, and zip.
Explanations of the syntax for the Actions fields are as follows.
-
media_type
- Type of medium. This argument is passed in from Volume Management as VOLUME_TYPE.
-
shared_object
- Programs that identify file systems and perform actions. If shared_object starts with `/' (slash), the full path name is used; otherwise, /usr/lib/rmmount is prepended to the
name.
-
args_to_so
- Arguments passed to the shared_object. These arguments are passed in as an argc and argv[].
The definition of the interface to Actions is located in /usr/include/rmmount.h.
Explanations of the syntax for the File system sharing fields are as follows.
-
media_or_file_system
- Either the type of medium or the specific file system to share.
-
share_command_options
- Options of the share command. See share(1M) for more
information about these options.
Explanations of the syntax for the Mount command options fields are as follows:
-
media_or_file_system
- Either the type of medium or the specific file system to share.
-
file_system_spec
- Specifies one or more file systems to which this line applies. Defaults to "all" file system types.
-
mount_command_options
- One or more options to be passed to the mount command. Multiple options require a space delimiter.
Explanations of the syntax for the fsck command options fields are as follows:
-
media_type
- The type of removable medium. A Bourne shell regular expression that matches names of file system media whose aliases are listed under /vol/dev/aliases. Examples include cdrom0, cdrom1, cdrom*, jaz0, jaz1, and jaz*.
-
filesystem_type
- The type of file system, for example, ufs or hsfs, that resides on the medium specified in media_type.
-
fsck_command_options
- One or more options to be passed to fsck(1M). Multiple options must be separated
by spaces.
The algorithm for the fsck configuration line is as follows:
- The fsck configuration line tells rmmount to run fsck on filesystem_type, as described above. The filesystem_type must be correct for the media_type
specified.
- If filesystem_type is not present, rmmount runs fsck on all file systems on all media that match media_type.
- If rmmount.conf contains no fsck configuration line or contains an fsck configuration line with a media_type that does not match a medium's alias, rmmount does not run fsck on the removable medium's file system, unless mount reports that the file system's dirty bit is set.
Default Values
|
The following is an example of an rmmount.conf file:
|
#
# 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
|
|
|