DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

idinstall(ADM)


idinstall -- add, delete, update, or get device driver configuration data

Syntax

/etc/conf/bin/idinstall [-adu] [-e] [-k] [-L] [-chHilmMnopqrst] dev_name

/etc/conf/bin/idinstall -g [-chHilnpqrst] dev_name

Description

The idinstall command is called by a Driver Software Package (DSP) Install script or Remove script to Add (-a), Delete (-d), Update (-u), or Get (-g) device driver configuration data. idinstall expects to find driver component files in the current directory. When components are installed or updated, they are moved or appended to files in the /etc/conf directory and then deleted from the current directory unless the -k flag is used. The options for the command are as follows:

The following options specify actions:


-a
add the DSP components

-d
delete the DSP components

-g
get the DSP components (print to the standard output, except Master)

-u
update the DSP components
The following options specify components:

-c
Mfsys component: filesystem type config (Master) data

-h
Shutdown: device shutdown component

-H
header files component

-i
Inittab component

-l
Sfsys component: filesystem type local (System) data

-m
Master component

-M
Mtune component

-n
Node (special file) component

-o
Driver.o component

-p
Space.c component

-q
Device.dat component

-r
Rc: device initialization component

-s
System component

-t
Stubs.c component
If no component is specified, the default is all except for the -g option where a single component must be specified explicitly.

The following are miscellaneous options:


-e
disable free disk space check

-k
keep files (do not remove from current directory) on add or update

-L
export files using symbolic links; always specify -k with this option

In the simplest case of installing a new DSP, the command syntax used by the DSP's installation script should be idinstall -a dev_name. In this case the command will require and install a Driver.o, Master and System entry, and optionally install the Space.c, Stubs.c, Node, Inittab, Rc, Shutdown, Mfsys, Sfsys, Device.dat, and header file components if those modules are present in the current directory. (A header file is defined as a file that has the extension .h.)

Driver.o, Space.c, Stubs.c, and any header files in the current directory are moved to a directory in /etc/conf/pack.d, and end up in /etc/conf/pack.d/dev_name. The dev_name is passed as an argument, which is used as the directory name. The remaining components are stored in the corresponding directories under /etc/conf in a file whose name is dev_name. For example, the Node file would be moved to /etc/conf/node.d/dev_name.

The idinstall -m usage provides an interface to the idmaster command which will add, delete, and update mdevice file entries using a Master file from the local directory. An interface is provided here so that driver writers have a consistent interface to install any DSP component.

If the -M option is specified, idinstall copies any records from an Mtune file in the local directory to /etc/conf/cf.d/mtune. Records for new parameters are appended to the file. Records for existing parameters are updated. New values for parameters must be self-consistent, consistent with the corresponding entry for the parameter in /etc/conf/cf.d/stune, and may not reduce the range of values currently allowed for the parameter. If idinstall -d is used to remove a driver, it does not delete or change entries that have been previously added or updated.

As stated above, driver writers will generally use only the idinstall -a dev_name form of the command. Other options of idinstall are provided to allow an Update DSP (that is, one that replaces an existing device driver component) to be installed, and to support installation of multiple controller boards of the same type.

If the call to idinstall uses the -u (update) option, it will:

idinstall also does a verification that enough free disk space is available to start the reconfiguration process. This is done by calling the idspace command. idinstall will fail if insufficient space exists, and exit with a non-zero return code. The -e option bypasses this check.

If the -L option is specified with the add (-a) or update (-u) options, the Driver.o and Stubs.c files are installed using a symbolic link rather than being copied physically. This allows a component to have a single copy of a sharable file in its own Software Storage Object (SSO). It can then export this file to multiple clients in order to save space on an installed system.

You should always specify the -k option with -L; the newly created symbolic link will not be resolvable if the original file is removed.

idinstall makes a record of the last device installed in a file (/etc/.last_dev_add), and saves all removed files from the last delete operation in a directory (/etc/.last_dev_del). These files are recovered by /etc/conf/bin/idmkenv whenever it is determined that a system reconfiguration was aborted due to a power failure or unexpected system reboot.

Exit values

An exit value of zero indicates success. If an error was encountered, idinstall will exit with a non-zero value, and report an error message.

Diagnostics

All error messages are designed to be self-explanatory. Typical error messages that can be generated by idinstall are as follows:
   Device package already exists.
   Cannot make the driver package directory.
   Cannot remove driver package directory.
   Local directory does not contain a Driver object (Driver.o) file.
   Local directory does not contain a Master file.
   Local directory does not contain a System file.
   Cannot remove driver entry.

See also

idcheck(ADM), idspace(ADM), mdevice(F), sdevice(F)
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003