#!/bin/sh
#
#  Copyright (c) 2008-2014, EMC Corporation.  All Rights Reserved.
#
#  Wrapper script for PowerPath cstadmin utility.
#

LD_LIBRARY_PATH=/etc/emc/rsa/cst/lib; export LD_LIBRARY_PATH

if [ ! -d ${LD_LIBRARY_PATH} ] ; then
    echo "Path to the CST libraries, ${LD_LIBRARY_PATH}, does not exist."
    echo "Please check and try again".
    exit 1
fi

if [ ! -x /etc/opt/emcpower/bin/pp_cstadmin ] ; then
    echo "Powerpath cstadmin utility, /etc/opt/emcpower/bin/pp_cstadmin, does not exist."
    echo "Please check and try again".
    exit 1
fi

/etc/opt/emcpower/bin/pp_cstadmin ${*}

