#!/sbin/sh
#------------------------------------------------------------------#
#
# HPUX_ID: @(#) $Revision: 17.3 $ generated on Fri Mar  9 17:07:50 MST 2001
#
# (c)Copyright 1983-2001 Hewlett-Packard Co.,  All Rights Reserved.
#
#------------------------------------------------------------------#
# SD postremove script template for 11.X patches.                  #
#------------------------------------------------------------------#
# This file is optional for all 11.X patches.  The purpose of this #
# script is to perform any necessary cleanup actions after the     #
# patch's files have been removed.                                 #
#------------------------------------------------------------------#

_PATCHID=PHCO_23262

UTILS="/usr/lbin/sw/control_utils"

if [ ! -f $UTILS ]; then
    echo "ERROR:   Cannot find $UTILS"
    exit 1
fi

. $UTILS
exitval=$SUCCESS

#####
##### Insert any code you may require at this point in the script.
##### Pay attention to the exitval variable and set appropriately
##### in your code.  If you are unsure as to what types of operations
##### are legal in this file and what types aren't, consult the 
##### "Guidelines for SD Control Scripts" document.
#
#----------------------------------------------------------------------------
#-------------------------- Begin ESSD extended script ----------------------
#----------------------------------------------------------------------------
#
################################################################################
# Start up the array daemon's (ARMServer and/or arraymond)

    echo "NOTE:    Starting the relevant array daemons."

    ps -e | grep arraymond >/dev/null 2>&1
    arraymond_stat=$?	
    if [[ $arraymond_stat -eq 0 ]] 
    then
      echo "NOTE:    Monitor daemon \"arraymond\" is already runing" 
    fi
 
    if [[ -x ${SW_ROOT_DIRECTORY}usr/lbin/hpC2400/hparrayrc ]]
    then
      echo "NOTE:    Check the file ${SW_ROOT_DIRECTORY}etc/hpC2400/HPARRAY.INFO"
      echo "         to determine if any arrays where found."

      ${SW_ROOT_DIRECTORY}usr/lbin/hpC2400/hparrayrc >> ${SW_ROOT_DIRECTORY}etc/hpC2400/HPARRAY.INFO 2>&1 &
    else
      echo "ERROR:   Array monitor daemon(s) cannot be started."
      exitval=$FAILURE
    fi

################################################################################
#
#----------------------------------------------------------------------------
#------------------------ End ESSD extended script --------------------------
#----------------------------------------------------------------------------
#
#####
##### START_CUSTOMIZATION_HERE

exit $exitval
