getvol(1M)


getvol -- verifies device accessibility

Synopsis

getvol -n [-l label] device

getvol [-f|-F] [-wo] [-l label | -x label] device

Description

getvol verifies that the specified device is accessible and that a volume of the appropriate medium has been inserted. The command is interactive and displays instructional prompts, describes errors, and shows required label information. getvol uses the device table, /etc/device.tab, to determine the characteristics of the device when performing the volume label checking.

Command options

getvol has the following options:

-n
Run the command in non-interactive mode. The volume is assumed to be inserted upon command invocation.

-l label
Specify that the label label must exist on the inserted volume (can be overridden by the -o option).

-f
Format the volume after insertion, using the format command defined for this device in the device table.

-F
Format the volume after insertion and places a filesystem on the device. Also uses the format command defined for this device in the device table.

-w
Allow the administrator to write a new label on the device. User is prompted to supply the label text. This option is ineffective if the -n option is enabled.

-o
Allow the administrator to override a label check.

-x label
Specifie that the label label must exist on the device. This option should be used instead of the -l option when the label can only be verified by visual means. Use of the option causes a message to be displayed asking the administrator to visually verify that the label is indeed label.

device
Name the device which should be verified for accessibility.

Files

/etc/device.tab

Return values

On success, getvol returns 0. On failure, it returns 1 if the command syntax was incorrect, an invalid option was used, or an internal error occurred, or returns 3 if the device table could not be opened for reading.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004