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

#
# Make sure that boot server daemons (in.rarpd, rpc.bootparamd, rpld) are not
# running before removing this package.
#
if [ "${PKG_INSTALL_ROOT:-/}" = "/" ]; then
	for i in rpld rpc.bootparamd in.rarpd
	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
