#!/bin/sh # Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved. # # ONSCTL wrapper script # # This script translates the commands invoked with onsctl to crsctl commands. # This is needed so that ONS can be transparently managed by CRS. This makes # the onsctl commands to be run via the crsd and keeps the status of ONS in # sync with both ONSCTL and CRS. CRS_HOME=%ORA_CRS_HOME% #CRS_HOME=${ORA_CRS_HOME} CRSCTL=${CRS_HOME}/bin/crsctl ONSCTL=${CRS_HOME}/opmn/bin/onsctli CLSECHO=${CRS_HOME}/bin/clsecho SRVCTL=${CRS_HOME}/bin/srvctl LOCALNODE=`${CRS_HOME}/bin/crsctl get nodename` if [ $? -ne 0 ]; then cmd="${CLSECHO} -p has -f crs -m 4535" $cmd exit 1 fi CMDARG=$1 shift case $CMDARG in start) cmd="${SRVCTL} start nodeapps -onsonly -n ${LOCALNODE}" #echo $cmd $cmd ;; shutdown) cmd="${SRVCTL} stop nodeapps -onsonly -n ${LOCALNODE}" #echo $cmd $cmd ;; stop) cmd="${SRVCTL} stop nodeapps -onsonly -n ${LOCALNODE}" #echo $cmd $cmd ;; *) ${ONSCTL} ${CMDARG} $* ;; esac EXIT=$? exit $EXIT