NAME
     add_drv - add a new device driver to the system

SYNOPSIS
     add_drv [ -b basedir ] [ -c class_name ]
          [ -i 'identify_name...'  ] [ -m  'permission','...'   ]
     driver_module

AVAILABILITY
     SUNWcsu

DESCRIPTION
     The add_drv command is used to inform the system about newly
     installed device drivers.

OPTIONS
     -b basedir         Sets the path to the  root  directory  of
                       the  diskless  client.  Used on the server
                       to add_drv for  a  diskless  client.   The
                       client machine must be rebooted to install
                       the driver.

     -c class_name      The driver  being  added  to  the  system
                       exports the class class_name.

     -i 'identify_name'
                       A whitespace separated list of aliases for
                       the driver driver_module.

     -m 'permission'    Specify the file system  permissions  for
                       device  nodes  created  by  the  system on
                       behalf of driver_module.

EXAMPLES
     The following example adds the SUNW,example  driver  to  the
     system,  with  an  alias name of SUNW,alias.  It assumes the
     driver has already been copied to /usr/kernel/drv.

          example# add_drv -m '* 0666 bin bin','a 0644 root sys' \
               -i 'SUNW,alias' SUNW,example

     Every minor node created by the system for the  SUNW,example
     driver  will  have the permission 0666, and be owned by user
     bin in the group bin, except for the minor device  a,  which
     will  be  owned by root, group sys, and have a permission of
     0644.

     The  following  example  adds  the  driver  to  the   client
     /export/root/sun1.   The driver is installed and loaded when
     the client machine, sun1, is rebooted.


          example# add_drv -m '* 0666 bin bin','a 0644 root sys' \
               -i 'SUNW,alias' -b /export/root/sun1 \
               SUNW,example

     This second example produces the same result as  the  first,
     except the changes are on the diskless client, sun1, and the
     client must be rebooted for the driver to be installed.

EXIT CODES
     add_drv returns 0 on success and 1 on failure.

FILES
     /kernel/drv         boot device drivers,  platform-dependent
                         drivers.
     /usr/kernel/drv     other drivers that could potentially  be
                         shared between platforms.
     /etc/driver_aliases driver aliases file.
     /etc/driver_classes driver classes file.
     /etc/minor_perm     minor node permissions.
     /etc/name_to_major  major number binding.




SEE ALSO
     devlinks(1M),    disks(1M),    drvconfig(1M),    kernel(1M),
     modinfo(1M),      ports(1M),     rem_drv(1M),     tapes(1M),
     driver.conf(4), system(4), ddi_create_minor_node(9F)

     Writing Device Drivers

NOTES
     Aliases may require quoting  (with  double-quotes)  if  they
     contain numbers.

BUGS
     add_drv will accept a full pathname for driver_module.  How-
     ever,  the  kernel  does  not use the full pathname; it only
     uses the final component and searches  the  internal  module
     path  for the module.  This can lead to the kernel loading a
     different module than expected.

     For this reason, it is not recommended that you use  add_drv
     with  a  full pathname.  See kernel(1M) for more information
     on the module path.