Solaris 10 10/08 Installation Guide: Solaris Flash Archives (Creation and Installation)

ProcedureTo Create a Predeployment Script

This script is run before the installation of the archive. If the script is meant to validate the archive, it is kept in the archive. If the script is meant to preserve local configurations on the clone system, it is kept on the clone system. This script also can analyze and collect local data necessary for later customization. For example, client-specific information can be saved before being overwitten by files about to be extracted. This information can then be used in the final stage after extraction.

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

  2. Store the script in one of the following directories.

    • For archive validation, store in the /etc/flash/predeployment directory.

    • If you are referencing with a precreation script, store in the $FLASH_DIR/preinstall directory.

    • If you are preserving configurations on a clone system, provide the path to the script that is stored on the clone system with the local_customization keyword in the JumpStart profile.

Example 3–3 Predeployment Script

if [ $? != 0 ]; then
	echo Unsupported hardware
	exit 1
if [ $? != 0 ]; then
	echo No license for this host
	exit 1
$FLASH_DIR/TestApplication/deploy_license_key \
$FLASH_DIR/TestApplication/save_data_files $FLASH_DIR/flash

exit 0