#!/bin/sh
#* ----------------------------------------------------------------------
#*               Proprietary and Confidential Information
#*
#* This material contains, and is part of a computer software program
#* which is, proprietary and confidential information owned by COMPUTER
#* ASSOCIATES INTERNATIONAL, INC.  The program, including this material,
#* may not be duplicated, disclosed or reproduced in whole or in part for
#* any purpose without the express written authorization of COMPUTER
#* ASSOCIATES. All authorized reproductions must be marked with this
#* legend.
#*
#*                          Copyright (c) 1992-2005
#*             Computer Associates International, Incorporated
#*                          All rights reserved
#*
#* ----------------------------------------------------------------------
#*  SCCS Module Control Stamp
#* ----------------------------------------------------------------------
#
#* "@(#)unifstat	1.1  09/08/08 17:32:53"
#* "Copyright (C) 1992-2008 Computer Associates International, Inc.  All rights reserved."
#
#
   
# CCSINS.272 - magka04:
# Script added to handle upgrade installs over NSM 3.x Managers for CCS comsumers
# requiring this upgrade capability

[ -f /etc/profile.CA ] && { CA_SECTION=all; export CA_SECTION; . /etc/profile.CA >/dev/null 2>&1; unset CA_SECTION ; }

if [ "$CASHCOMP" = "" ];then
  echo "CASHCOMP is not set in $0."
  echo "Exiting."
  exit 4
fi

# Test to see if NSM/CCS r11 is installed
r11_installed=0
ccsinstalled=`lsm -l -O PIF | grep CommonServices | wc -l`
nsminstalled=`lsm -l -O PIF | grep UnicenterNSM | wc -l`
[ $nsminstalled -eq 1 -o $ccsinstalled -eq 1 ] && r11_installed=1
[ $r11_installed -eq 0 -a ! -f "${CAIGLBL0000}/scripts/unistart" ] && r11_installed=1

if [ $r11_installed -eq 0 ]; then
   $CAIGLBL0000/bin/unifstat
else
   $CASHCOMP/bin/unisrvcntr status $@
fi
