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:
Explanations of the syntax for the Actions fields are as follows.
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.
Explanations of the syntax for the Mount command options fields are as follows:
Explanations of the syntax for the fsck command options fields are as follows:
The algorithm for the fsck configuration line is as follows:
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
Example 1 Sharing of Various File Systems
The following examples show how various file systems are shared using the share syntax for the rmmount.conf file. These lines are added after the Actions entries.
share cdrom* -o ro=engineering
share solaris_2.x* -d distribution CD
Example 2 Customizing mount Operations
The following examples show how different mount options could be used to customize how rmmount mounts various media:
mount cdrom* hsfs -o nrr
mount floppy1 -o ro
mount floppy1 -o ro foldcase
mount jaz1 -o ro
Example 3 Telling rmmount to Check File Systems Before Mounting Them
The following examples show how to tell rmmount to check file systems with fsck before mounting them, and how to specify the command line options to be used with fsck:
fsck floppy* ufs ---o f
fsck floppy* ufs -o p
fsck cdrom* -o f
fsck jaz* ufs -o f
Example 4 Using the nohidden mount Option
The following example shows how to use the nohidden mount option:
$ mount * pcfs -o nohidden
The nohidden mount option is 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.
volcancel(1), volcheck(1), volmissing(1), mount(1M), mount_hsfs(1M), rmmount(1M), share(1M), vold(1M), vold.conf(4), volfs(7FS)
When using the mount options line, verify that the specified options will work with the specified file system types. The mount command will fail if an incorrect mount option/file system combination is specified. Multiple mount options require a space delimiter.