You can customize the actions taken during installation by delivering installation scripts with your package. The decision on which type of script to use depends upon when the action is needed during the installation process. As a package is installed, pkgadd(ADM) performs the following steps:
This is the only point at which your package can solicit input from the installer.
Installation occurs class-by-class and class action scripts are executed accordingly. The list of classes operated upon and the order in which they should be installed is initially defined with the CLASSES parameter in your pkginfo(F) file. However, your request script can change the value of CLASSES.
When a package is being removed, pkgrm(ADM) performs these steps:
Removal also occurs class-by-class. As with the installation class action scripts, if more than one removal script exists, they are processed in the reverse order in which the classes were listed in the CLASSES parameter at the time of installation.
The request script is not processed at the time of package removal. However, its output (a list of parameter values) is saved and so is available to removal scripts.