#!/bin/sh
# $Id: //depot/prod/capstan/Rcapstan1.1/src/bin/smo_wrapper.skel#1 $
# Copyright (c) 2005 Network Appliance, Inc.
# All rights reserved.
#
# Run SMO from the Host Agent.
#

read OP

JVM_ARGS="$JVM_ARGS -enableassertions"

SMODIR="/opt/NetApp/smo"

_SMO_JAR=${SMODIR}/lib/smo.jar
if [ ! -r ${_SMO_JAR} ] ; then
	echo "Unable to run smo: There is no smo.jar in \"$SMODIR/lib\"."
	exit 1
fi

LD_LIBRARY_PATH="$SMODIR/lib:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH

cd ${SMODIR}

umask 0000
echo ${OP} | java ${JVM_ARGS} -classpath ${_SMO_JAR} com.netapp.dlm.process.common.OperationManagerWrapper $*
