Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cdrom(1M) — Interactive 3.2r4.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mount(1m)

exportfs(1m)

cdrom(1M)  —  

NAME

cdrom − mount and unmount cdroms

SYNOPSIS

cdrom [ −u ] [ −v ] [ unit# ...  ]

DESCRIPTION

This program provides a user-friendly front-end to mounting and unmounting CD-ROM discs, without requring that the user be the super-user.  It also handles automatically exporting and unexporting the file systems with the NFS exportfs command. 

The program is installed set-uid to root, and is driven totally by configuration entries in the defaults file /etc/default/cdrom.  This file specifies such information as the device name, mount directory, optional mount options (for example, "HS,upper,vers"), and optional exportfs export entries.  The user is only allowed to specify the unit number and whether the CD is to be mounted or unmounted.  This eliminates security issues such as letting the user mount on top of another file system, as well as other related issues. 

OPTIONS

−u Unmount CD-ROM unit unit#.  If the −u option is not specified, the CD-ROM is mounted. 

−v Verbose; show each command as it is executed. 

unit#
The number of the CD-ROM drive that is to be affected.  If unit# is not specified, it defaults to 0. 

DEFAULTS

The following are the possible entries in /etc/default/cdrom. 

CDROMnDEV=
where n is the number of the CD-ROM drive.  This is set to the device name of the CD-ROM, for example, /dev/dsk/cd0t6.  NOTE: there must be a CDROMnDEV= entry for each CD-ROM drive . 

CDROMnDIR=
where n is the number of the CD-ROM drive.  This is set to the directory that the CD-ROM is to be mounted on.  If this is not specified in the defaults file, it is set to /cdrom. 

CDROMnMOUNTOPT=
where n is the number of the CD-ROM drive.  This specifies any options that should be passed to the mount(1m) command.  If this is not specified in the defaults file, it is set to "HS,nosuid".  NOTE: if this flag is used in the default file, the first portion must be a file system type, for example, HS, S51K, etc. See the −f option of mount(1m).

CDROMnEXPORTOPT=
where n is the number of the CD-ROM drive.  This is set to any options that should be passed to the exportfs command.  See the −e option of the exportfs(1m) command.

EXAMPLES

An example default file might have the following entries:

CDROM0DEV=/dev/dsk/cd0t6
CDROM0DIR=/cdrom
CDROM0MOUNTTOPT=HS
CDROM0EXPORTOPT=-v
CDROM1DEV=/dev/dsk/cd0t2
CDROM1DIR=/mnt

To mount both CD-ROMs in the example default file:
cdrom −v 0 1

To unmount CD-ROM number 0 in verbose mode:
cdrom −uv 0

FILES

/etc/default/cdrom
File containing default values.

/cdrom
Default directory to mount cdrom to if no directory is specified in /etc/default/cdrom. 

DIAGNOSTICS

cdrom: no entry for "CDROM1DEV=" in /etc/default/cdrom
There must be a CDROMnDEV= entry in the defaults file for every CD-ROM drive. 

For any error beginning with mount: see mount(1m). 

For any error beginning with exportfs: see exportfs(1m). 

SEE ALSO

mount(1m), exportfs(1m). 

ADDED VALUE

This entry, supplied by SunSoft, Inc., is an extension of UNIX System V. 
 

\*U  —  Version 1.0

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026