#!/bin/ksh
# IBM_PROLOG_BEGIN_TAG 
# This is an automatically generated prolog. 
#  
# 61pkgha_r714 src/packages/cluster/es/cspoc/cmds/usr/cluster.es.cspoc.cmds.pre_d.sh 1.2.1.1 
#  
# Licensed Materials - Property of IBM 
#  
# COPYRIGHT International Business Machines Corp. 2004,2011 
# All Rights Reserved 
#  
# US Government Users Restricted Rights - Use, duplication or 
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp. 
#  
# IBM_PROLOG_END_TAG 
# @(#)28	1.2.1.1 src/packages/cluster/es/cspoc/cmds/usr/cluster.es.cspoc.cmds.pre_d.sh, pkghacmp, 61pkgha_r714 12/1/11 11:28:32
########## Begin check for running cluster services ##########
[[ -z "$INUCLIENTS" && -z "$INUBOSTYPE" ]] && {
    clstate=$(lssrc -ls clstrmgrES | grep "Current state:" | cut -f2 -d":")
    if [ -n "$clstate" \
            -a "$clstate" != " NOT_CONFIGURED" -a "$clstate" != " ST_INIT" ]
    then
        echo "\nCluster services are active on this node.  Please stop all"
        echo "cluster services prior to deinstalling this software.\n"
        exit 1
    fi
}
########### End Check for running cluster services ###########

exit 0
