RMMOUNT(8) | Maintenance Commands and Procedures | RMMOUNT(8) |
rmmount - removable media mounter for CD-ROM, floppy, Jaz drive, and others
/usr/sbin/rmmount [-D]
The rmmount utility is a removable media mounter that is executed by volume management whenever a removable medium, such as a CD-ROM or a floppy, is inserted. Removable media is managed by an application or a volume manager. rmmount can also be called by using volrmmount(1).
Upon insertion of a medium and following invocation of the volcheck(1) command, rmmount determines what type of file system (if any) is on that medium. If a file system is present, rmmount mounts the file system in one of the locations listed below.
For a diskette (floppy):
/floppy/floppy0
/floppy/floppy_name
/floppy/unnamed_floppy
For a CD-ROM or a DVD-ROM:
/cdrom/cdrom0
/cdrom/CD-ROM_name
/cdrom/CD-ROM_name/partition
/cdrom/unnamed_cdrom
For a Zip drive:
/rmdisk/zip0
/rmdisk/Zip_name
/rmdisk/Zip_name/partition
/rmdisk/unnamed_zip
For a Jaz drive:
/rmdisk/jaz0
/rmdisk/Jaz_name
/rmdisk/Jaz_name/partition
/rmdisk/unnamed_Jaz
For a generic "rmdisk" drive:
/rmdisk/rmdisk0
/rmdisk/rmdisk_name
/rmdisk/rmdisk_name/partition
/rmdisk/unnamed_rmdisk
If the media is read-only (for example, a CD-ROM or a floppy with write-protect tab set), the file system is mounted read-only.
If a file system is not identified, rmmount does not mount a file system. See the for more information on the location of CD-ROM, floppy, and other media without file systems.
If a file system type has been determined, it is then checked to see that it is "clean." If the file system is "dirty," fsck -p (see fsck(8)) is run in an attempt to clean it. If fsck fails, the file system is mounted read-only.
After the mount is complete, "actions" associated with the media type are executed. These actions allow for the notification to other programs that new media are available.
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.
In order to execute an action, rmmount performs a dlopen(3C) on the shared object and calls the action function defined within it. The definition of the interface to actions can be found in /usr/include/rmmount.h.
File systems mounted by rmmount are always mounted with the nosuid flag set, thereby disabling setuid programs and access to block or character devices in that file system. Upon ejection, rmmount unmounts mounted file systems and executes actions associated with the media type. If a file system is "busy" (that is, it contains the current working directory of a live process), the ejection will fail.
-D
/usr/lib/rmmount/*.so.1
volcheck(1), volrmmount(1), dlopen(3C), attributes(7), fsck(8)
March 1, 2007 | OmniOS |