#!/bin/sh

########################################################################
#
#	Licensed Materials - Property of IBM
#
#	(C) Copyright IBM Corp. 1994-2015. All Rights Reserved
#
#	US Government Users Restricted Rights - Use, duplication
#	or disclosure restricted by GSA ADP Schedule Contract
#	with IBM Corp.
#
#	========================================================
#	Module Information:
#
#	DESCRIPTION:
#	nco_nnsaprobe
#
########################################################################

#######################################
# Find nco_common
NCO_COMMON=`dirname $0`/../bin/nco_common

# Check for nco_common, and load if found
if [ ! -f "$NCO_COMMON" ]; then
        echo "Cannot find nco_common" 1>&2
        exit 1
fi
. $NCO_COMMON

#
# environment variables that this shell script sets/changes:
#
export OMNIHOME OMNISERVER OMNIUSER OMNIPASSWD

#
# What program are we attempting to run ?
#
PROGRAM=`basename $0`

#
# Check the script name - if nco_probe is being run as itself it does nothing
#
if [ $PROGRAM = nco_nnsaprobe ]; then
	exit 0
fi

#
# Can we run this probe ?
#
if [ ! -f $OMNIHOME/probes/$ARCH/$PROGRAM ]; then
	err "Not installed for $ARCH"
fi

#
# Execute probe
#
exec $OMNIHOME/probes/nco_p_nonnative $OMNIHOME/probes/$ARCH/$PROGRAM "$@"
