idmodreg(1M) idmodreg(1M)
NAME
idmodreg - register loadable kernel modules with the running
kernel
SYNOPSIS
/etc/conf/bin/idmodreg [-r root] [-f modreglist]
[[-M module-name] . . .] [-#]
DESCRIPTION
One of the Installable Driver Tools (idtools) for kernel
configuration, idmodreg registers all the loadable kernel
modules listed in /etc/mod_register, or in another file if
specified by the -f option. All loadable kernel modules need
to be registered by idmodreg before they can be auto-loaded by
the running kernel or demand-loaded using the modadmin(1M)
command.
When idbuild(1M) is used to generate a new kernel, a new
mod_register file is generated, and that file is copied to
/etc/mod_register the next time the system is rebooted. When
configuring a loadable kernel module with the -M option of
idbuild, the entries for the module are appended to
/etc/mod_register. Do not modify the file manually.
Options
idmodreg takes the following options:
-f modreglist
Register all the loadable kernel modules listed in
modreglist instead of the default file
/etc/mod_register.
-r root Use the configuration information under the root
directory instead of /etc/conf.
-M module-name
Register the specified loadable kernel module, and
append an entry (or entries) for the module to
/etc/mod_register, so it will be registered every
time the system is rebooted. idbuild uses this
option when a loadable kernel module configuration
is requested.
-# Print debugging information.
Copyright 1994 Novell, Inc. Page 1
idmodreg(1M) idmodreg(1M)
Files
Each mod_register file entry provides information about a
single module. In this one line entry all fields are
positional and are separated by colons. The entry is of the
form:
module-type:command:module-name:module-data
module-type
Contains an integer representing the module type.
If a module has more than one type, separate entries
will be generated for each type.
command Currently contains the value 1 to indicate
``registration.''
module-name
Identifies the module using the name specified in
the module-name field of the module's Master file.
module-data
Additional information that depends on the type of
the module.
For non-STREAMS character device drivers, module-type is 1 and
module-data is the major device number as specified in the
Master file of the module. If the driver has multiple major
numbers, there must be a separate mod_register entry for each
major number.
For block device drivers, module-type is 2 and module-data is
the major device number as specified in the Master file of the
module. If the driver has multiple major numbers, there must
be a separate mod_register entry for each major number.
For STREAMS character device drivers, module-type is 5 and
module-data is the major device number as specified in the
Master file of the module. If the driver has multiple major
numbers, there must be a separate mod_register entry for each
major number.
For STREAMS modules, module-type is 3 and module-data is the
external name for the module.
Copyright 1994 Novell, Inc. Page 2
idmodreg(1M) idmodreg(1M)
For filesystems, module-type is 4 and module-data is the
external name for the module.
For exec modules, module-type is 7 and module-data is in the
form:
order,wildcard[,magics]
where order is as specified in the Master file of the module,
wildcard is Y or N as determined by the presence or absence of
the wildcard keyword in the $magic line of the Master file,
and magics contains the list of magic numbers, if any, in the
$magic line of the Master file.
For miscellaneous modules, that is, those that do not fit into
any of the above categories, module-type is 6 and module-data
is the external name for the module.
In all cases where an external name is used, this is the name
from the $name line of the Master file or the module name if
no $name line is present.
Errors
An exit value of zero indicates successful completion of the
command. If errors occur, idmodreg reports error messages for
each error and exits with the return value 1. If the error is
a failure to register a module, an error message is reported,
but the command continues processing the remaining modules
listed in /etc/mod_register.
USAGE
The idmodreg command is executed automatically [by init(1M)]
on every system reboot. idbuild also calls idmodreg, with the
-M option, when a loadable kernel module configuration is
requested [see idbuild(1M)]. idmodreg can also be invoked as
a user-level command to register all the loadable kernel
modules again.
REFERENCES
idbuild(1M), init(1M), modadmin(1M)
NOTICES
This command, which is not intended to be executed directly,
and the mod_register file may be changed or eliminated in a
future release.
Copyright 1994 Novell, Inc. Page 3