#! /bin/sh
#
# ident "@(#)checkinstall-global-only.sh	1.1 05/03/23 SMI"
#
# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#

# assume success
#
EXITVAL=0

ZONENAME=/sbin/zonename

if [ -x "$ZONENAME" ] ; then
	ZONE=`$ZONENAME`
	if [ "global" != "$ZONE" ] ; then

		echo 1>&2 "checkinstall[$PKGINST]: installation not permitted in local zone"

		# An exit value of 3 terminates the pkgadd cleanly.  See
		# the "Application Packaging Developer's Guide" for details.
		#
		EXITVAL=3
	fi
fi

exit "$EXITVAL"

