#! /bin/sh # # $Id: nw_clnt_postremove.SunOS,v 1.4 2006/04/24 14:48:32 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 StorageTek EBS" #=============================================================================== # Function: remove_scripts # Summary: remove the NetWorker startup scripts #=============================================================================== remove_scripts() { echo "Removing ${PRODUCT_NAME} start/stop scripts" rm -f /etc/init.d/networker /etc/rc2.d/S95networker /etc/rc0.d/K05networker } #=============================================================================== # Function: clnt_del_rpc # Summary: remove entries for nsr, rap, and hagent from /etc/rpc #=============================================================================== clnt_del_rpc() { echo "Removing ${PRODUCT_NAME} entries from /etc/rpc" file=/etc/rpc # remove entries for rap searchstr='^rap' sedcmd="/${searchstr}/d" grep "${searchstr}" ${file} > /dev/null 2>&1 if [ $? -eq 0 ]; then sed -e "${sedcmd}" ${file} > ${file}.tmp.$$ mv -f ${file}.tmp.$$ ${file} fi # remove entries for nsr searchstr='^nsr' sedcmd="/${searchstr}/d" grep "${searchstr}" ${file} > /dev/null 2>&1 if [ $? -eq 0 ]; then sed -e "${sedcmd}" ${file} > ${file}.tmp.$$ mv -f ${file}.tmp.$$ ${file} fi # remove entry for hagent searchstr='^hagent' sedcmd="/${searchstr}/d" grep "${searchstr}" ${file} > /dev/null 2>&1 if [ $? -eq 0 ]; then sed -e "${sedcmd}" ${file} > ${file}.tmp.$$ mv -f ${file}.tmp.$$ ${file} fi } #=============================================================================== # Function: main #=============================================================================== remove_scripts clnt_del_rpc exit 0