#!/bin/sh
#  $Id: sbc_pre_new,v 1.1 2003/09/22 11:19:24 psl Exp $
#=============================================================================
#
#           SESAM PRE procedure for UNIX clients
#
#=============================================================================
#
# Description: This procedure is called from SESAM before backup is started;
#              it gives the user a possibility to do some special things before 
#              backup ( prepare databases, send messages etc. ).
#              This a variant to default PRE procedure, which is used, if in database
#              table defaults key='prepost_args',value='new' is instered.
#
#              It is called with 10 parameters from the current SESAM backup:
#
#                $1 = SESAM task name 
#                $2 = Backup source
#                $3 = Tape server interface
#                $4 = Type of backup C_opy, F_ull, D_ifferential, I_ncremental
#                $5 = Execution counter ( = number of LIS-file )
#                $6 = Saveset ID
#                $7 = Number of SESAM drive
#                $8 = Label of used media
#                $9 = Name of mediapool
#                10 = Schedule
#
#               Returning status:
#                if this procedure ran OK
#                then echo "STATUS:OK"
#                else echo "STATUS:ERROR text"
#
# >>> This is a user programmable procedure <<<
#
#=============================================================================

#=== Print call arguments =====================================
task=$1
source=$2 
tape_server=$3
backup_type=$4
exe_cnt=$5
saveset=$6
drive_number=$7
label=$8
pool=$9
shift
schedule=$9

echo source       = $source
echo tape_server  = $tape_server
echo task         = $task
echo drive_number = $drive_number
echo backup_type  = $backup_type
echo exe_cnt      = $exe_cnt
echo saveset      = $saveset
echo label        = $label
echo pool         = $pool
echo schedule     = $schedule

#=== Please insert your specific actions here =====================================

#echo STATUS:ERROR {message}
echo STATUS:OK
exit