'\" te .\" Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. .TH modunload 1M "19 Nov 2001" "SunOS 5.11" "System Administration Commands" .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(1M). If \fBID\fR is \fB0\fR, all modules that were autoloaded which are unloadable, are unloaded. Modules loaded by \fBmodload\fR(1M) are not affected. .SH OPTIONS .sp .LP The following options are supported: .sp .ne 2 .mk .na \fB\fB-e\fR \fIexec_file\fR\fR .ad .RS 16n .rt 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 .mk .na \fB\fB-i\fR \fImodule_id\fR\fR .ad .RS 16n .rt Specify the module to be unloaded. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Availabilitysystem/core-os .TE .SH SEE ALSO .sp .LP \fBmodinfo\fR(1M), \fBmodload\fR(1M), \fBupdate_drv\fR(1M), \fBattributes\fR(5) .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(1M) command.