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
-
Procedure scripts are executed as uid=root and gid=other.
-
Each installation procedure script must use the
installf(1M)
command
to notify
pkgadd(1M)
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(1M)
manual page
and the
case studies
for details and examples.)
-
Each removal procedure script must use the
removef(1M)
command to
notify
pkgrm(1M)
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(1M)
manual page
and the
case studies
for details and examples.)
NOTE:
The
installf(1M)
and
removef(1M)
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(1M)
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(1M)
command is used
to register the object.
Next topic:
Basic steps of packaging
Previous topic:
The build class script
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004