#! /sbin/sh
####################################################################
#	$Id: checkremove,v 1.1 1999/05/28 15:03:35 jamesp Exp $
# 	Copyright (c) Digi, Digi International Inc.
#
#	"Check Remove" script for Digi RealPort Driver.
#	Copyright (c) 1988-98 Digi International Inc.
#
#	For HP-UX 10.X & 11.X
#
#	NOTE: It is expected that the swremove program will call this
#             script to determine whether the driver software can be
#             removed.
#				
####################################################################

PATH=$SW_PATH
export PATH

#
# If there are no processes with a name of "drpd", (i.e. no
# daemons currently running) we can exit successfully
# (with a 0), else you exit with a 1.
#

PID=`ps -e | awk '$4 == "drpd" {print $1}'`
[ -z "$PID" ] && exit 0

echo "ERROR:   You must kill the RealPort daemons before removing."

exit 1
