#! /bin/sh # # $Id: nw_serv_postremove.SunOS,v 1.2.66.1 2006/04/26 18:33:31 castrv Exp $ Copyright (c) 2003-2006, EMC Corporation. # # All rights reserved. # PATH=/usr/sbin:/usr/bin:/sbin PRODUCT_NAME="Sun StorEdge EBS" #=============================================================================== # Function: serv_del_syslog # Summary: remove entries from syslog.conf and restart syslogd #=============================================================================== serv_del_syslog() { echo "Removing entries for ${PRODUCT_NAME} from /etc/syslog.conf" file=/etc/syslog.conf start_message=\ "# Start of lines added by ${PRODUCT_NAME} - DO NOT DELETE OR CHANGE THIS LINE" end_message=\ "# End of lines added by ${PRODUCT_NAME} - DO NOT DELETE OR CHANGE THIS LINE" searchstr="${start_message}" sedcmd="/${start_message}/,/${end_message}/d" grep "${searchstr}" ${file} > /dev/null 2>&1 if [ $? -eq 0 ]; then sed -e "${sedcmd}" ${file} > ${file}.tmp.$$ mv -f ${file}.tmp.$$ ${file} fi # restart the syslog daemon echo "Restarting the syslog daemon" file=/etc/syslog.pid if [ -f ${file} ]; then kill -HUP `cat ${file}` else echo "${file} does not exist. Please manually restart the syslog daemon." fi } #=============================================================================== # Function: main #=============================================================================== serv_del_syslog # cluster configuration script removes cluster configuration files if [ -f /usr/bin/NetWorker.clustersvr ]; then # The cluster configuration script knows how to remove # cluster configuration files /usr/bin/networker.cluster -r /bin fi # message about leaving /nsr intact fmt<<-! Warning: the /nsr directory contains the online client file index files and the server media index file. You should only remove it if you want to completely remove ${PRODUCT_NAME} from this system. To completely remove ${PRODUCT_NAME} from this system you must remove the /nsr directory. /nsr may be a symbolic link. If so, you will also need to remove the directory that it points to. ! exit 0