#!/usr/bin/ksh
#
# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#

USE_INTERNAL_DEP=TRUE

typeset opt

while getopts 'R:G:B:U:Z' opt
do
        case "$opt" in
                R)      RESOURCE=$OPTARG;;
                G)      RESOURCEGROUP=$OPTARG;;
		B)	Basepath=$OPTARG;;
		U)	User=$OPTARG;;
                Z)      USE_INTERNAL_DEP=FALSE;;
                *)      exit 1;;
        esac
done

. `dirname $0`/../etc/config
. `dirname $0`/functions
. `dirname $0`/../../lib/functions_static

validate_options
rc_val=${?}
if [ ${rc_val} -ne 0 ]
then
	debug_message "Method: `basename $0` - End (Exit 1)"
	exit 1
fi

debug_message "Method: `basename $0` - Begin"
$SET_DEBUG

rm $LOGFILE 2>/dev/null

if ! validate
then
        debug_message "Method: `basename $0` - End (Exit 1)"
        exit 1
fi

debug_message "Method: `basename $0` - End (Exit 0)"

exit 0
