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

ProcedureTo Create a Postdeployment Script

This script is kept in the archive or stored in a local directory on the clone system and runs after installation. The script reconfigures a new system image on a clone system. If the script is stored in the archive, the changes affect all the clone systems. If the script is stored in a local directory on the clone system, the changes affect only the clone system. For example, client-specific information that is saved by a predeployment script can be applied to the clone environment, completing the installation.

Postdeployment scripts can also be used to clean up files after the archive is installed. For example, log files such as those files in /var/adm can be cleaned out.

Note –

Not all log files need a script for cleanup. Log files in /var/tmp can be excluded when the archive is created.

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

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

    • To affect all clone systems, store the script in the /etc/flash/postdeployment directory.

    • To affect only a local 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–4 Postdeployment Script

$FLASH_DIR/TestApplication/restore_data $FLASH_DIR/flash