Solaris 9 Installation Guide

To Create a Precreation Script

This script runs during archive creation. The script has various uses.

  1. Create the precreation script. Follow the guidelines that are described in Guidelines for Creating a Custom Script.

  2. Store the script in the /etc/flash/precreation directory.

Example 18–1 Excerpts From a Precreation Script

The following examples are excerpts from a precreation script.

Example 18–2 Precreation Script

echo "Test precreation script started" >> $FLASH_DIR/summary
cat /opt/TestApp/critical_file_list | flcheck -
if [ $? != 0 ]; then
	echo "Test precreation script failure" >> $FLASH_DIR/summary
	exit 1
echo "Test precreation script started" >> $FLASH_DIR/summary
	$FLASH_DIR/predeployment/.TestApplicationLicenceTransfer \
echo "Test precreation script finished" >> $FLASH_DIR/summary
exit 0

Using a Precreation Script to Create a User-Defined Archive Section

A precreation script can create a user-defined section in the archive to provide specific application information. This section is intended for archive maintenance. The script must be put in the $FLASH_DIR/sections directory. The Solaris Flash archive does not process a user-defined section. For example, a section could contain a description of the archive or perhaps a script to check the integrity of an application.

A user-defined section requires the following format.