#!/bin/sh 
#
# $Header: usm/src/cmds/acfsdriverstate/acfsdriverstate /main/2 2009/05/01 13:38:28 averhuls Exp $
#
# Copyright (c) 2007, 2009, Oracle and/or its affiliates. All rights reserved. 
#
#    NAME
#      acfsdriverstate - front end for the Perl script that does the work.
#
#    DESCRIPTION
#      Purpose
#          Verify USM installation/load/version/supported.
#
#    MODIFIED   (MM/DD/YY)
#    averhuls    04/29/09 - Add -orahome option: used in a production
#                           environment if CRSHOME Perl is not readable.
#    averhuls    01/29/09 - Created from usm_driver_state
#
#    NOTES
#      This wrapper program supports only Lunix/Unix platforms.
#      Use acfsdriverstate.bat for Windows platforms.
#
#############################################################################

ORA_CRS_HOME=%ORA_CRS_HOME%
if [ ! -d $ORA_CRS_HOME ]; then
  ORA_CRS_HOME=$ORACLE_HOME
fi

CMDNAME=acfsdriverstate
 
if [ $# -gt 0 ] ; then
  if [ $1 = "-orahome" ] ; then
    ORACLE_HOME=$2
    shift # pop -orahome
    shift # pop <location>
  else
    ORACLE_HOME=$ORA_CRS_HOME
  fi
fi
 
if [ ! -d "$ADE_VIEW_ROOT" ] ; then
  TOOLS_DRIVER=${ORA_CRS_HOME}/lib/acfstoolsdriver.sh
else
  ORACLE_HOME=$ORA_CRS_HOME
  TOOLS_DRIVER=${ADE_VIEW_ROOT}/usm/src/cmds/acfstoolsdriver.sh
fi

export ORA_CRS_HOME ORACLE_HOME

exec $TOOLS_DRIVER $CMDNAME $@
# Should never get here.
exit -1
