#!/bin/sh
# bpenableTD.sh $Revision: 1.1 $
# bcpyrght
#**************************************************************************
# Copyright 1993 - 1999 VERITAS Software Corporation. All Rights Reserved *
#**************************************************************************
# ecpyrght
#
# Shell script to enable the NCR Teradata Class Type
#

DB_DIR=/usr/openv/netbackup/db
ADMIN_DIR=/usr/openv/netbackup/bin/admincmd
EditScript=${DB_DIR}/bpenableTD.scr
DisplayName="NCR Teradata"

if [ ! -r ${EditScript} ] ; then
	echo "Error: ${EditScript} does not exist or is not readable!"
	exit 1
fi

${ADMIN_DIR}/bplicense -editfile ${EditScript} -textfile ${DB_DIR}/Class_att_defs

bpstat=$?

echo ""
case ${bpstat} in
	0)
		echo "Scheduling for ${DisplayName} successfully enabled"
		;;
	147)
		echo "Warning: Scheduling for ${DisplayName} already enabled"
		;;
	*)
		echo "Error: Scheduling for ${DisplayName} could not be enabled"
		;;
esac

exit ${bpstat}
