DOCUMENT ID: 1255-02 SYNOPSIS: Explanation into the workings of driver removal using rem_drv OS RELEASE: 2.x PRODUCT: Solaris x86 KEYWORDS: rem_drv remove device driver manual page DESCRIPTION: The manual page's explanation of "rem_drv" only gives basic information. Here is the full quote from the man page rem_drv(1M): "The rem_drv command is used to inform the system that the driver module driver_module is no longer a valid driver module." There is no explanation of affected files or detailed actions of the function. SOLUTION: Rem_drv performs similar functions for servers (standalone) and clients. The -b option specifying a base directory for the client defines a client "root" removal task. Only one copy of rem_drv is allowed to run on the system at any given time. A lock file precludes other invocations. The program "modinfo" is exec'ed to obtain the module id for the operation. A failure to find an entry for the module causes an immediate exit. The system call modctl is utilized to determine the major number (parameter MODGETMAJBIND), and to notify the kernel to unload the driver (parameter MODUNLOAD). "modctl" control operations are only performed on the "server". All references to the driver and aliases in the forms "driver:", "driver@", "clone:driver" are found on the "working root" using the system "find" command and removed. The "rem_drv/add_drv database" is cleaned of all driver entries. A "reconfigure" file is created to force a system reconfiguration upon "reboot". "rem_drv" fails silently if you have used the same driver more than once before the reboot. A summary of affected files: /etc/driver_aliases /etc/driver_classes /etc/minor_perm /etc/name_to_major DATE APPROVED: 09/28/95