'\" te .\" Copyright (c) 2005, Sun Microsystems, Inc. .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] .TH MODUNLOAD 8 "Nov 19, 2001" .SH NAME modunload \- unload a module .SH SYNOPSIS .LP .nf \fBmodunload\fR \fB-i\fR \fImodule_id\fR [\fB-e\fR \fIexec_file\fR] .fi .SH DESCRIPTION .sp .LP \fBmodunload\fR unloads a loadable module from the running system. The \fImodule_id\fR is the \fBID\fR of the module as shown by \fBmodinfo\fR(8). If \fBID\fR is \fB0\fR, all modules that were autoloaded which are unloadable, are unloaded. Modules loaded by \fBmodload\fR(8) are not affected. .SH OPTIONS .sp .LP The following options are supported: .sp .ne 2 .na \fB\fB-e\fR \fIexec_file\fR\fR .ad .RS 16n Specify the name of a shell script or executable image file to be executed before the module is unloaded. The first argument passed is the module id (in decimal). There are two additional arguments that are module specific. For loadable drivers, the second argument is the driver major number. For loadable system calls, the second argument is the system call number. For loadable exec classes, the second argument is the index into the \fBexecsw\fR table. For loadable filesystems, the second argument is the index into the \fBvfssw\fR table. For loadable streams modules, the second argument is the index into the \fBfmodsw\fR table. For loadable scheduling classes, the second argument is the index into the class array. Minus one is passed for an argument that does not apply. .RE .sp .ne 2 .na \fB\fB-i\fR \fImodule_id\fR\fR .ad .RS 16n Specify the module to be unloaded. .RE .SH SEE ALSO .sp .LP .BR attributes (7), .BR modinfo (8), .BR modload (8), .BR update_drv (8) .SH NOTES .sp .LP The \fBmodunload\fR command is often used on driver modules to force the system to reread the associated driver configuration file. While this works in the current Solaris release, it is not the supported way to reread the configuration file and is not guaranteed to work in future releases. The supported way for rereading driver configuration file is through the \fBupdate_drv\fR(8) command.