#!/bin/ksh
############################################################
# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms
#
# ident  "@(#)op_clean 1.5	06/01/09 SMI"
############################################################

## A script to shutdown se6000watchdog and wbem
## and remove DspPersistence.xml*.  This script
## is to be performed after ops unconfig the sys.

set -x
/usr/bin/pkill se6000watchdog
/etc/init.d/init.se6000 stop
/usr/bin/rm -f /opt/se6x20/resources/DspPersistence.xml*
/usr/bin/rm -f /opt/se6x20/watchdog_no_restart

##
##  Clean up system log files on the service processor
##
#/etc/init.d/syslog stop
#mv /var/adm/messages /var/adm/messages.factory
#touch /var/adm/messages
#mv /var/adm/messages.dsp /var/adm/messages.dsp.factory
#touch /var/adm/messages.dsp
#mv /var/adm/messages.array /var/adm/messages.array.factory
#touch /var/adm/messages.array
#/etc/init.d/syslog start

#
#  Clean up StorADE logs and alarm databases
#
mkdir /var/opt/SUNWstade/DATA.factory
#mv /var/opt/SUNWstade/DATA /var/opt/SUNWstade/DATA.factory
cp /var/opt/SUNWstade/DATA/*.db /var/opt/SUNWstade/DATA.factory
cp /var/opt/SUNWstade/DATA/Events.log /var/opt/SUNWstade/DATA.factory
/usr/bin/rm -f /var/opt/SUNWstade/DATA/*.db
/usr/bin/rm -f /var/opt/SUNWstade/DATA/Events.log

