#!/bin/sh

################################################################################
#
#    5639-VC4 and 5639-VW1
#
#    © Copyright Inspur Corp. 2008, 2016 All Rights Reserved.
#
#    The source code for this program is not published or
#    otherwise divested of its trade secrets, irrespective of
#    what has been deposited with the U.S. Copyright Office.
#
################################################################################


if [ ! -f "$SVCAGENT_HOME/config/envConf" ]
then
    echo "Please set SVCAGENT_HOME";
    exit 1;
fi

. $SVCAGENT_HOME/config/envConf


NODEID=`/compass/ec_getend | cut -d : -f 7`

# make the repository and ssl key/certificate
mkrepository
mv $SVCAGENT_DATA/mkrepository.log /dumps/cimom/mkrepositorylog.$NODEID

# create the pegasus log files
touch /dumps/cimom/PegasusTrace.$NODEID
touch /dumps/cimom/PegasusStandard.$NODEID
touch /dumps/cimom/PegasusAudit.$NODEID
touch /dumps/cimom/PegasusError.$NODEID
touch /dumps/cimom/PegasusDebug.$NODEID

ln -s /dumps/cimom/PegasusTrace.$NODEID $SVCAGENT_DATA/PegasusTrace.log
ln -s /dumps/cimom/PegasusStandard.$NODEID $SVCAGENT_DATA/PegasusStandard.log
ln -s /dumps/cimom/PegasusAudit.$NODEID $SVCAGENT_DATA/PegasusAudit.log
ln -s /dumps/cimom/PegasusError.$NODEID $SVCAGENT_DATA/PegasusError.log
ln -s /dumps/cimom/PegasusDebug.$NODEID $SVCAGENT_DATA/PegasusDebug.log

