Class action scripts are executed as uid=root and gid=other.
If a package spans more than one volume, the class action script will be
executed once for each volume that contains at least one file belonging to the
class.
Consequently, each script must be
``multiply executable.''
This means that executing a script any number of times
with the same input must produce the same results as executing the script only
once.
NOTE:
The installation service relies upon this condition being met.
The script is executed only if there are files in the given class existing
on the current volume.
pkgadd(ADM)
(and
pkgrm(ADM))
creates a list of
all objects listed in the
pkgmap(F)
file
that belong to the class.
As a result,
a class action script can only act upon pathnames defined in the
pkgmap(F)
and belonging to a particular class.
A class action script should never add, remove, or modify a pathname or system
attribute that does not
appear in the list generated by
pkgadd(ADM)
unless by use of the
installf(ADM)
or
removef(ADM)
commands.
(See the manual pages for details on
these two commands and the
case studies
for examples of them in use.)
When the class action script executes for the last time (the
input pathname is the last path on the last volume containing a file of this
class),
it is executed with the keyword argument ENDOFCLASS.
This flag allows you to include post-processing actions into your script.