#!/bin/sh

# For RTI 4464327


# Get My BASEDIR
SUNWSCSAP_BASEDIR=`/usr/bin/pkgparam SUNWscsap BASEDIR`
CI_CONF_DIR=${SUNWSCSAP_BASEDIR}/SUNWscsap/sap_ci/etc
AS_CONF_DIR=${SUNWSCSAP_BASEDIR}/SUNWscsap/sap_as/etc

# The following directory is created by another package. So get
# the BASEDIR of the other package.
SUNWSCU_BASEDIR=`/usr/bin/pkgparam SUNWscu BASEDIR`
if [ "$SUNWSCU_BASEDIR" = "/" ]; then
        SUNWSCU_BASEDIR=""
fi
RTRDIR=${SUNWSCU_BASEDIR}/usr/cluster/lib/rgm/rtreg

# Create the link if the link already does not exist.
if [ ! -r $RTRDIR/SUNW.sap_ci_v2 ]
then
        ln -s $CI_CONF_DIR/SUNW.sap_ci_v2 $RTRDIR/SUNW.sap_ci_v2
fi

if [ ! -r $RTRDIR/SUNW.sap_as_ci_v2 ]
then
        ln -s $AS_CONF_DIR/SUNW.sap_as_v2 $RTRDIR/SUNW.sap_as_v2
fi

exit 0