#! /bin/sh # # $Id: nw_serv_preremove.SunOS,v 1.4.30.1 2006/04/26 18:33:31 castrv Exp $ Copyright (c) 2004-2006, EMC Corporation. # # Copyright (c) 2004-2006 EMC Corporation. # # All rights reserved. This is an UNPUBLISHED work, and # comprises proprietary and confidential information of EMC. # Unauthorized use, disclosure, and distribution are strictly # prohibited. Use, duplication, or disclosure of the software # and documentation by the U.S. Government is subject to # restrictions set forth in a license agreement between the # Government and EMC or other written agreement specifying # the Government's rights to use the software and any applicable # FAR provisions, such as FAR 52.227-19. # PATH=/usr/sbin:/usr/bin:/sbin PRODUCT_NAME="Sun StorEdge EBS" #=============================================================================== # Function: stop_daemons # Summary: find nsr_shutdown and stop any running daemons #=============================================================================== stop_daemons() { if [ $PKGINST = LGTOserv ]; then NSR_SHUTDOWN=${CLIENT_BASEDIR}/sbin/nsr_shutdown else NSR_SHUTDOWN=${CLIENT_BASEDIR}/sbin/nsr/nsr_shutdown fi [ -z "${NSR_SHUTDOWN}" ] && return # not installed [ ! -x "${NSR_SHUTDOWN}" ] && return # not executable ${NSR_SHUTDOWN} -l > /dev/null 2>&1 # no running daemons if [ $? -eq 0 ]; then echo "Shutting down the ${PRODUCT_NAME} daemons" ${NSR_SHUTDOWN} -q fi } #=============================================================================== # Function: main #=============================================================================== stop_daemons exit 0