Further Information
Examples of Pre-Exec and Post-Exec Commands for UNIX
Appendix A A-21
else
echo "Failed to unmount the disk --> ABORTED!"
exit 1
fi
Filesystem
Pre-Exec: Report
Usage of the
Filesystem
#!/bin/sh
echo
"=================================================="
fuser -cu /var/application_mount_point
echo
"=================================================="
exit 0
Session
Post-Exec:
Application
Startup
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