'\"macro stdmacro
.if n .pH g1a.drvinstall @(#)drvinstall	40.10 of 10/10/89
.\" Copyright 1989 AT&T
.nr X
.if \nX=0 .ds x} drvinstall 1M "Essential Utilities" "\&"
.if \nX=1 .ds x} drvinstall 1M "Essential Utilities"
.if \nX=2 .ds x} drvinstall 1M "" "\&"
.if \nX=3 .ds x} drvinstall "" "" "\&"
.TH \*(x}
.SH NAME
\f4drvinstall\f1 \- install/uninstall a driver
.SH SYNOPSIS
\f4/usr/sbin/drvinstall\f1
[
\f4\-m\f1 \f2master\fP
]
[
\f4\-d\f1 \f2object\f1
]
[
\f4\-s\f1 \f2system\fP
]
.br
[
\f4\-o\f1 \f2directory\fP
]
[
\f4\-c\f1 \f2minor\f1
]
\f4\-v\f1 \f2version\f1
[
\f4\-ufbnx\f1
]
.SH DESCRIPTION
The \f4drvinstall\f1 command
accepts an \f2object\f1 file, \f4master\fP file and \f4system\fP file as inputs,
and creates the corresponding specially formatted file for use in the
configuration of a new bootable operating system.
In addition, the \f4master\fP and \f4system\fP files may be modified.
The \f4\-u\fP option is used for uninstalling a driver.
Pathnames specified for the options below can be either relative or
absolute pathnames.
.PP
.TP
\f4\-m\f2 master\f1
specifies the path name of the \f4master\fP directory to be used.
One or both of the \f4\-m\f1 or \f4\-d\f1
options must be specified, and at least one must specify a file name as
the last component of the path name.
If this flag is omitted, the \f4/etc/master.d\f1 directory is used.
.TP
\f4\-d \f2object\f1
specifies the path name of the input \f2object\fP directory to be used.
One or both of the \f4\-m\f1 or \f4\-d\f1
options must be specified, and at least one must specify a file name as
the last component of the path name.
If this flag is omitted, the \f4/boot\f1 directory is used.
.PP
.TP
\f4\-s \f2system\fP
specifies the path name of the \f4system\fP file to be used.
If this flag is omitted, the \f4/stand/system\f1 file is used.
.TP
\f4\-o \f2directory\fP
specifies the path name of the output bootable file.
If this flag is omitted, the \f4/boot\f1 directory is used.
.TP
\f4\-c \f2minor\f1
specifies the \f2minor\fP number to be inserted
at the end of an INCLUDE statement for the driver.
The INCLUDE statement is inserted in the \f2system\fP file.
\f2Minor\f1 is optional in an INCLUDE
and specifies the quantity (default of 1) of minor devices to be
controlled by the driver.
If the driver is a hardware driver, \f4\-c\f1 is ignored.
.TP
\f4\-v\f2 version\f1
specifies the \f2version\f1 number of the \f4drvinstall\f1 command
compatible with the \f4master\fP file being used.
The \f4\-v\f1 option is required on the command line and currently
supports "1.0".
.TP
\f4\-u\fP
specifies that the named driver is to be uninstalled.
A driver dependency check is made and if a dependency is found,
a warning message is issued and the command is aborted.
If no dependency is found, then \f4drvinstall\f1 will:
.RS +.6i
.IP \(bu 4
Remove the bootable
.I object
file.
.IP \(bu 4
Replace the major number with a "\-" in the
\f4master\fP
file if the driver is a software driver.
.IP \(bu 4
Delete the INCLUDE statement from the \f4system\fP file if the driver
is not a hardware driver.
.IP \(bu 4
Print the major number if the driver is a software driver.
.RE
.TP
\f4\-f\fP
when used with the \f4\-u\f1 option, disables the dependency check.
This results in the driver being uninstalled regardless of dependencies.
.TP
\f4\-b\fP
inhibits generation of the \f2object\f1 file.
This option is ignored for uninstall.
.TP
\f4\-n\fP
Inhibits any edit of the \f4system\fP file.
.TP
\f4\-x\fP
Enables debugging output.
.P
For any driver installed, \f4drvinstall\f1
calls the \f4mkboot\f1 command to produce a bootable \f2object\f1 file.
The resultant output file is placed into the directory determined by
the \f4\-o\f1 argument.
.P
If the driver to be installed is a software driver, \f4drvinstall\f1 will:
.IP \(bu 4
Assign a major number to that driver if there is a "\-" entry in the
major number field of the associated \f4master\fP file entry.
The \f4drvinstall\f1 command expects any unused field of the
\f4master\fP file to be filled with a "\-".
.IP "" 4
The major numbers available for software drivers on
AT&T 3B2 Computers are 30\-71 inclusive.
The remaining major numbers are reserved for hardware devices,
used by integral drivers, or reserved for SCSI devices.
The \f4drvinstall\f1 command determines the available major numbers by
scanning all existing files in \f4/etc/master.d\fP for major numbers;  it
then assigns the first unused number in the above range
(note that the directory specified by \f2master\fP
on the command line is not searched for major numbers).
This value replaces the corresponding "\-" value in the major number
field of the \f4master\fP file.
.IP \(bu 4
Print the major number found or assigned in the \f4master\fP file.
.PP
If the driver to be installed is not a hardware driver (it is, e.g., a
software driver or a loadable type of module), \f4drvinstall\f1 will
insert an INCLUDE statement for the driver in the \f4system\fP file.
.SH SEE ALSO
\f4cunix\fP(1M),
\f4mkboot\fP(1M).
.br
\f4master\fP(4),
\f4system\fP(4) in the
\f2Programmer's Reference Manual\f1.
.SH DIAGNOSTICS
The major number assigned or found for a software driver is
printed on
\f4stdout\f1.
A zero is returned for success and a non-zero is returned for failures.
.Ee
