#!/bin/sh
#
# # ident    "%Z%%M% %I%     %E% SMI" 
#
# Copyright (c) 2000 by Sun Microsystems, Inc.
# All rights reserved
#
#Added for bugid 4336719

LOGDIR=$ROOTDIR/var/sadm/wbem
if [ -d ${LOGDIR}/log ]; then
    if [ ! -d ${LOGDIR}/logprepatch ]; then
        /usr/bin/mv ${LOGDIR}/log ${LOGDIR}/logprepatch 2>/dev/null
    fi
fi 

# Remove old backed up log; Backup the existing log
if [ -f ${LOGDIR}/logr/store ]; then
    /usr/bin/rm -rf ${LOGDIR}/logru3
    /usr/bin/mkdir -m 755 ${LOGDIR}/logru3
    for i in ${LOGDIR}/logr/*; do
	if [ "$i" != "${LOGDIR}/logr/README" ]; then
	    /usr/bin/mv $i ${LOGDIR}/logru3 
	else
	    /usr/bin/cp $i ${LOGDIR}/logru3
	fi
    done
fi

exit 0
