Further Information

Examples of Pre-Exec and Post-Exec Commands for UNIX

else

echo "Failed to unmount the disk --> ABORTED!"

exit 1

fi

Filesystem #!/bin/shPre-Exec: ReportUsage of the

Filesystem echo "=================================================="

fuser -cu /var/application_mount_point

Session

Post-Exec:

Application

Startup

echo "=================================================="

exit 0

This example Post-exec script will start up the Oracle database.

#!/bin/sh

export ORACLE_HOME=$2 export ORACLE_SQLNET_NAME=$1

if [ -f $ORACLE_HOME/bin/svrmgrl ]; then $ORACLE_HOME/bin/svrmgrl << EOF

connect sys/manager@$ORACLE_SQLNET_NAME as sysdba startup

EOF

echo "Oracle database \"$ORACLE_SID\" started." exit 0

else

echo "Cannot find Oracle SVRMGRL ($ORACLE_HOME/bin/svrmgrl)."

exit 1

Appendix A

A-21