A SERVICE OF

logo

Further Information
Examples of Pre-Exec and Post-Exec Commands for UNIX
Appendix AA-22
fi
Disk Image
Post-Exec: Mount
a Disk After the
Raw Volume
Backup
#!/bin/sh
if [ $BDACC != 0]
then
echo "Backup could not read the disk!"
echo "Disk will not be automatically mounted!"
fi
echo "The disk will be now mounted!"
mount /dev/vg05/lvol2 /disk_with_many_files
if [ $? = 0 ]
then
echo "Disk successfully mounted!"
exit 0
else
echo "Failed to mount disk!"
exit 1
fi
Filesystem
Post-Exec: Log
Backup for the
Record
#!/bin/sh
if [ ! -f /etc/logfile ]
then
/etc/logfile
fi
echo "Backup finished with code $BDACC on " `date` >>
/etc/logfile
# We do not want a backup to be marked failed even if the
previous
action failed.
exit 0