DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Packaging your software applications

The procedure script

The procedure script gives a set of instructions that are performed at particular points in installation or removal. Four possible procedure scripts are described below. The case studies show examples of procedure scripts.

Naming conventions for procedure scripts

The four procedure scripts must use one of the names listed below, depending on when these instructions are to be executed.


preinstall
executes before class installation begins

postinstall
executes after all volumes have been installed

preremove
executes before class removal begins

postremove
executes after all classes have been removed

Procedure script usage rules

  1. Procedure scripts are executed as uid=root and gid=other.

  2. Each installation procedure script must use the installf(ADM) command to notify pkgadd(ADM) that it will add or modify a pathname. After all additions or modifications are complete, this command should be invoked with the -f option to indicate all additions and modifications are complete. (See the installf(ADM) manual page and the case studies for details and examples.)

  3. Each removal procedure script must use the removef(ADM) command to notify pkgrm(ADM) that it will remove a pathname. After removal is complete, this command should be invoked with the -f option to indicate all removals have been completed. (See the removef(ADM) manual page and the case studies for details and examples.)


NOTE: The installf(ADM) and removef(ADM) commands must be used for the following reasons. If a procedure script physically removes an object from the system, the system's contents database still contains an entry for that object until the removef(ADM) command is used to remove the entry. Similarly, if a procedure script places an object on the system, it will not be registered in the contents database until the installf(ADM) command is used to register the object.


Next topic: Basic steps of packaging
Previous topic: The build class script

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005