#!/bin/sh
#
# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
#ident	"@(#)checkinstall	1.1	08/05/15 SMI"
#

DISKLESS_SRVC=`echo ${PKG_INSTALL_ROOT} | /usr/bin/grep export/Solaris_`

if [ "$DISKLESS_SRVC" ]; then
	INSTALL_ROOT=${PKG_INSTALL_ROOT}/usr_$ARCH.all
else
	INSTALL_ROOT=${PKG_INSTALL_ROOT}
fi

POSTGRES_USER=`/usr/bin/grep "^postgres:" ${INSTALL_ROOT}/etc/passwd`

if [ -z "$POSTGRES_USER" ]
then
	echo "Error: 'postgres' user not found."
	echo "Please install the patch for 6438076 (Add default uid/group for Postgres)."
	echo "The patch needed is 125367-01 for SPARC and 125368-01 for x86 systems."
	exit 1
fi

exit 0
