Software Distributor Administrator Guide (September 2010)
— Use uppercase first letters of phrases after colons. (This helps break up the
message into digestible “bites” of information.)
— Surround product, fileset, directory, and file names, and other variable-valued
strings with quotes. For example:
echo "ERROR: Cannot open file \"$file\"." &>2
— Write in the present tense. Avoid “would”, “will”, and similar verb tenses.
Also avoid past tense except where necessary.
— Use “cannot” rather than “can’t”, “could not”, “couldn’t”, “unable to”, “failed
to”, and similar phrases.
— Write messages that make sense to system administrators and users. Consider
your audience.
11.8 File Management by Control Scripts
• All files created by a preinstall, postinstall, or configure script must be removed
by a companion postremove, preremove or unconfigure script.
Files created by scripts are not known by the swremove command, and will not
get removed when it removes those files installed by swinstall. If you want
script-created files removed by SD, you will have to add them to the IPD by either
the swmodify command or the control_utils function IPD_addfile.
• If any files in the previous revision of a product have changed names or became
obsolete, a product/fileset preinstall or postinstall script in the new revision of the
product must remove the old files. The agent does not remove the files in an existing
product/fileset before updating it to a newer revision.
NOTE: It is necessary to perform the cleanup task of any previous revision that
can be updated to the new revision. Sometimes this is more than just the previous
revision.
11.9 Testing Control Scripts
The following testing suggestions do not cover all test scenarios. There may still be
problems with a control script even after doing this testing. For example, you may test
installing/removing individual filesets. But there might be some interactions that are
discovered only after all the filesets are installed on or removed from the system.
Similarly, you may test the control scripts on a fully loaded system and miss a problem
when you execute a command in your script that is not part of the base (or core) system.
If your target system does not contain the particular command, your script may fail.
11.8 File Management by Control Scripts 291