Validates the contents and the integrity of the software. The script fails the archive creation if the integrity is broken.
Prepares products for later customization on clone system.
Registers other installation scripts dynamically during archive creation.
Adds a message to the flash-creation summary file. The message must be short and record only that scripts were started and finished and the results. You can view the results in the summary section.
Create the precreation script. Follow the guidelines that are described in Guidelines for Creating a Custom Script.
Store the script in the /etc/flash/precreation directory.
The following examples are excerpts from a precreation script.
To log the start time in the summary section, use the following example:
echo "MyApp precreation script started">> $FLASHDIR/summary
To check the software integrity, use the flcheck command. This command cannot be used at the command line. The syntax for this command is as follows:
flcheck software component files and directories ...| -
For example, to validate the files and directories, use the following example:
flcheck software component files and directories If Not in selection - refuse creation echo "Myapp Integrity Damage">>$FlashDIR/summary
Or, to keep new files and directories that are unexpected and not fail the archive creation, use the following example:
flcheck software component files and directories If Not in selection include by force flinclude software component
To register deployment scripts and data, use the following example:
cp predeployment script $FLASHDIR/preinstall/proc.d ln -s $FLASHDIR/preinstall/order.dS55.MyApp cp postdeployment script $FLASHDIR/postinstall/proc.d ln -s $FLASHDIR/postinstall/order.dS55.MyApp
To see application specific data in a user-defined section, use the following example:
cp custom section $FLASHDIR/custom_sections/MyApp
To log the success of the installation in the summary section, use the following example:
echo "product one flash preparation started." >>$FLASH_DIR/summary ... echo "product one flash preparation finished successfully">>$FlASH_DIR/summary
#!/bin/sh 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 fi echo "Test precreation script started" >> $FLASH_DIR/summary /opt/TestApplication/license_cloning $FLASH_DIR/predeployment/.TestApplicationLicenceTransfer \ $FLASH_DIR/custom_sections/TestApplicationLicenceCounter echo "Test precreation script finished" >> $FLASH_DIR/summary exit 0
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.
Must be line oriented
Must terminate with newline (ASCII 0x0a) characters
Can have unlimited length of individual lines
Encode binary data by using base64 or a similar algorithm.