#!/bin/sh
#
# Copyright (c) 2000 by Sun Microsystems, Inc.
# All rights reserved.
#
# ident	"@(#)preremove	1.1	00/12/20 SMI"
#

#
# Make sure that NFS client daemons (lockd, statd) are not
# running before removing this package.
#
if [ "${PKG_INSTALL_ROOT:-/}" = "/" ]; then
	for i in lockd statd
	do
		/usr/bin/pgrep -x -u 0 "$i" >/dev/null
		if [ $? -ne 1 ]; then
			echo "$i running; unable to remove package"
			exit 1
		fi
	done
fi

exit 0
