#
#
# WARNING:
# This script can be run in order to re-create the repository.
# It will REMOVE the entire contents of any existing repository
# first, so care should be used when running this.
#

#
# GET RID OF THE OLD REPOSITORY ...
# Actually, you need to do this by hand without cimserver
# running, and then start up cimserver again.
#

##### rm -rf $PEGASUS_REPOSITORY_DIR

#
# CREATE CLEAN REPOSITORY ...
#

#
# The following are for the InterOp Namespace
#

INTEROPNS=root/PG_InterOp

$PEGASUS_BIN_DIR/cimmof -I$PEGASUS_CIMXX_MOF_DIR -n$INTEROPNS $PEGASUS_CIMXX_MOF_DIR/CIM_Core$PEGASUS_CIM_SCHEMA.mof
$PEGASUS_BIN_DIR/cimmof -I$PEGASUS_CIMXX_MOF_DIR -n$INTEROPNS $PEGASUS_CIMXX_MOF_DIR/CIM_Event$PEGASUS_CIM_SCHEMA.mof
$PEGASUS_BIN_DIR/cimmof -I$PEGASUS_MOF_DIR/Pegasus -n$INTEROPNS $PEGASUS_MOF_DIR/Pegasus/PG_InterOpSchema20.mof

#
# The following are for the Internal Namespace
#

INTERNALNS=root/PG_Internal

$PEGASUS_BIN_DIR/cimmof -I$PEGASUS_CIMXX_MOF_DIR -n$INTERNALNS $PEGASUS_CIMXX_MOF_DIR/Core$PEGASUS_CIM_SCHEMA\_Qualifiers.mof
$PEGASUS_BIN_DIR/cimmof -I$PEGASUS_MOF_DIR/Pegasus -n$INTERNALNS $PEGASUS_MOF_DIR/Pegasus/PG_InternalSchema20.mof

#
# The following are for the ManagedSystem Namespace
#

MANAGEDSYSTEMNS=root/cimv2

$PEGASUS_BIN_DIR/cimmof -I$PEGASUS_CIMXX_MOF_DIR -n$MANAGEDSYSTEMNS $PEGASUS_CIMXX_MOF_DIR/CIM_Schema$PEGASUS_CIM_SCHEMA.mof
$PEGASUS_BIN_DIR/cimmof -I$PEGASUS_MOF_DIR/Pegasus -n$MANAGEDSYSTEMNS $PEGASUS_MOF_DIR/Pegasus/PG_ManagedSystemSchema20.mof
$PEGASUS_BIN_DIR/cimmof -I$PEGASUS_MOF_DIR/Pegasus -n$INTEROPNS $PEGASUS_MOF_DIR/Pegasus/PG_ManagedSystemSchema20R.mof
