#!/bin/sh
#
# ident "@(#)postinstall	1.3    06/16/04 SMI"
#
# Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#

OS=`uname -s`
if [ ! -n "${OS}" ]; then
    echo "Unable to determine operating system."
    exit 1
fi

INSTALL_DATA=${BASEDIR}/usr/share/lib/jato/.install_data

RELOCATE=""
if [ -n "${PKG_INSTALL_ROOT}" ]; then
    RELOCATE="-R ${PKG_INSTALL_ROOT}"
fi

if [ "${OS}" = "SunOS" ]; then
    # Save pkginfo to a file and register it with the pkg database.
    pkgparam -v $RELOCATE $PKGINST > ${INSTALL_DATA}/${PKG}.pkginfo
    installf -c none ${RELOCATE} ${PKGINST} ${INSTALL_DATA}/${PKG}.pkginfo f 644 root sys
    installf -f ${RELOCATE} ${PKGINST}
fi

exit 0
