#!/bin/bash
#
# This postflight script echoes the values of the available 
# arguments and environmental variables.
#
/usr/bin/logger -i "Start postflight script"
/usr/bin/logger -i ""
/usr/bin/logger -i "Arguments:"
/usr/bin/logger -i ""
/usr/bin/logger -i "\$1: full path to the installation package"
/usr/bin/logger -i "     $1"
/usr/bin/logger -i "\$2: full path to the installation destination"
/usr/bin/logger -i "     $2"
/usr/bin/logger -i "\$3: mountpoint of the destination volume"
/usr/bin/logger -i "     $3"
/usr/bin/logger -i "\$4: root directory \"/\" for the current System folder"
/usr/bin/logger -i "     $4"
/usr/bin/logger -i ""
/usr/bin/logger -i "Environment variables available to a postflight executable:"
/usr/bin/logger -i "     INSTALLER_TEMP, PACKAGE_PATH, RECEIPT_PATH, SCRIPT_NAME, and TMPDIR"
/usr/bin/logger -i ""
/usr/bin/logger -i "\$INSTALLER_TEMP: scratch area used by Installer for temporary work files"
/usr/bin/logger -i "     $INSTALLER_TEMP"
/usr/bin/logger -i ""
/usr/bin/logger -i "\$PACKAGE_PATH: full path to the installation package; should be same as \$1"
/usr/bin/logger -i "     $PACKAGE_PATH"
/usr/bin/logger -i ""
/usr/bin/logger -i "\$RECEIPT_PATH: full path to directory containing the file being executed"
/usr/bin/logger -i "     $RECEIPT_PATH"
/usr/bin/logger -i ""
/usr/bin/logger -i "\$SCRIPT_NAME: name of the file being executed"
/usr/bin/logger -i "     $SCRIPT_NAME"
/usr/bin/logger -i ""
/usr/bin/logger -i "\$TMPDIR: if set, a path to a location on a writable destination volume"
/usr/bin/logger -i "     $TMPDIR"
/usr/bin/logger -i ""
/usr/bin/logger -i "End postflight script"
exit 0
