NAME
kminstall — add, delete, update a kernel module
SYNOPSIS
/usr/sbin/kminstall
[-a|-d
|-u]
module_name
DESCRIPTION
kminstall
will add
(-a),
delete
(-d)
or update
(-u)
a module on the system.
kminstall
expects to find the module component files in the current directory.
When components are installed or updated with
-a
or
-u
option, they are copied into subdirectories of the
/usr/conf
and
/stand
directories.
Options
The options for
kminstall
are:
- -a
Add the components for the named module,
module_name.
To create the module's components,
kminstall
copies:
mod.o
to
/usr/conf/km.d/module_name/mod.o
master
to
/usr/conf/master.d/module_name
system
to
/stand/system.d/module_name
If
node,
space.h,
and
Modstub.o
files are also present in the current directory,
kminstall
also copies:
node
to
/usr/conf/node.d/module_name
space.h
to
/usr/conf/km.d/module_name/space.h
Modstub.o
to
/usr/conf/km.d/module_name/Modstub.o
kminstall
expects a readable
mod.o,
master,
and
system
file
in the current directory.
It creates the required directories if they do not exist. If
module_name
already exists on the system,
kminstall
prints a message and fails.
- -d
Remove the components for the named module,
module_name.
To remove the module's components,
kminstall
first unloads and unregisters the module. Then
kminstall
deletes the following files:
/usr/conf/km.d/module_name/mod.o
/usr/conf/master.d/module_name
/usr/conf/km.d/module_name/space.h
(if present)
/usr/conf/km.d/module_name/Modstub.o
(if present)
/usr/conf/node.d/module_name
(if present)
/stand/system.d/module_name
/stand/dlkm/mod.d/module_name
/stand/dlkm/system.d/module_name
(if present)
/stand/dlkm/node.d/module_name
(if present)
kminstall
also deletes the directory entries:
/usr/conf/km.d/module_name
/stand/dlkm/mod.d/module_name
If
module_name
is configured as a loadable module and its entry is in the
/etc/loadmods
file (see
loadmods(4)),
then
kminstall
prints a warning message and removes the module entry from
/etc/loadmods.
If
module_name
is loaded,
kminstall
tries to unload the module.
If the unload fails, it prints a message and exits with an error; otherwise,
kminstall
tries to unregister the module. If the unregistration fails, then
kminstall
prints a message and exits with an error.
- -u
Update the components for the named module,
module_name.
To update the module's components,
kminstall
copies:
mod.o
to
/usr/conf/km.d/module_name/mod.o
master
to
/usr/conf/master.d/module_name
updated
system
to
/stand/system.d/module_name
If
node,
space.h,
and
Modstub.o
files are also present in the current directory,
kminstall
copies:
node
to
/usr/conf/node.d/module_name
space.h
to
/usr/conf/km.d/module_name/space.h
Modstub.o
to
/usr/conf/km.d/module_name/Modstub.o
kminstall
expects a readable
mod.o,
master,
and
system
file in the current directory. If
module_name
already exists on the system,
kminstall
updates the module.
When updating an existing module, the values of the tunable parameters and the
$LOADABLE
and
$CONFIGURATION
flags are taken from the running system and replace those in the new
system
file for the module.
If
module_name
does not exist on the system, then
kminstall
prints a warning and adds the module to the system.
kminstall
creates the required directories if they do not exist.
RETURN VALUE
An exit value of zero indicates success. If an error occurs,
kminstall
exits with a non-zero value and reports an error message.
Error messages are self-explanatory.
FILES
- /usr/conf/master.d/*
Default input master kernel configuration tables
- /stand/system.d/*
Default kernel module description files
- /usr/conf/km.d/module_name/mod.o
Module object file
- /usr/conf/master.d/module_name
Module master file
- /stand/system.d/module_name
Module description file
- /usr/conf/km.d/module_name/space.h
Module configuration file
- /usr/conf/node.d/module_name
Module node file
- /usr/conf/km.d/module_name/Modstub.o
Module object file required by stub module
- /stand/dlkm/mod.d/module_name
Loadable image of module