Software Distributor Administrator Guide (September 2010)

11.5.8 Fix Scripts
Fix scripts are executed by the swverify command. The pathname of the script
being executed is:
$ {SW_CONTROL_DIRECTORY}fix
A fix script can be used to correct attribute problems detected by a verify script.
A fix script can create missing directories, correct file modifications (mode, owner,
group, major, and minor), and recreate symbolic links.
11.5.9 Checkremove Scripts
Checkremove scripts are executed during the Analysis phase of a swremove session.
The pathname of the script being executed is:
$ {SW_CONTROL_DIRECTORY}checkremove
A checkremove script must not modify the system.
A checkremove script determines whether the product/fileset can be removed by
performing checks beyond those performed by swremove. Example checks include
checking to see if the product/fileset is actively in use.
If the checkremove script fails, no filesets in the product will be removed. The
GUI/TUI interface of swremove notifies you that the checkremove script has failed.
You can then: diagnose the problem, fix it, and re-execute the analysis phase;
unselect the target system(s) in question; or unselect the product/fileset. The
command line interface notifies you for each individual checkremove failure, and
no filesets in that product are removed.
A checkremove script is executed for installations into the primary root (“/”) or
an alternate root. Since most of the actions of this script will involve checking the
current conditions of a running system (that is, the primary root), it may not need
to perform any actions when the product/fileset is being removed from an alternate
root.
11.5.10 Preremove Scripts
Preremove scripts are executed during the Remove phase of a swremove session.
The pathname of the script being executed is:
$ {SW_CONTROL_DIRECTORY}preremove
All preremove scripts for a product are executed immediately before the product’s
files are removed.
A preremove script should perform specific tasks preparatory to the files being
removed. The swremove session will proceed with removing the files regardless
of the return value from a preremove script. Example actions include removing
files created in the postinstall script.
286 Using Control Scripts