#!/bin/sh # # # Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. # # NAME # okadriverstate - front end for the Perl script that does the work. # # DESCRIPTION # Purpose # Verify OKA installation/load/version/supported. # # # NOTES # This wrapper program supports only Lunix/Unix platforms. # Use okadriverstate.bat for Windows platforms. # ############################################################################# ORA_CRS_HOME=%ORA_CRS_HOME% if [ ! -d $ORA_CRS_HOME ]; then ORA_CRS_HOME=$ORACLE_HOME fi # If ORA_CRS_HOME is still not right - that is, it does not # contain our libraries, it means that the script is being run before it is # instantiated with an env variable that is not right (perhaps a db home instead # of a GI home). We will try one last time to find a good # GIHome to run from. # This is because okadriverstate must be able to run # before okaroot is run - the patch and install setup uses # this script to tell if OKA is supported, and it is run # before our scripts are instantiated. # So we try and use the path we are running from, where we assume # that this is a GI home. if [ ! -r $ORA_CRS_HOME/lib/osds_okadriverstate.pm ] ; then # Take the path we are running from, which we assume is the # GI Home/bin and go one level up to find the GI Home. # Since we are only concerned with finding the library # we don't need to find the canonical path or anything like that. # If we were connecting to ASM, we would need the same canonical # path that ASM was running from. ORA_CRS_HOME=`dirname $0`/.. fi CMDNAME=okadriverstate if [ $# -gt 0 ] ; then if [ $1 = "-orahome" ] ; then ORACLE_HOME=$2 shift # pop -orahome shift # pop else ORACLE_HOME=$ORA_CRS_HOME fi fi TOOLS_DRIVER=${ORA_CRS_HOME}/lib/okatoolsdriver.sh export ORA_CRS_HOME ORACLE_HOME exec $TOOLS_DRIVER $CMDNAME $@ # Should never get here. exit -1