#!/bin/ksh -h -p
# Copyright 1994 Sun Microsystems, Inc. All Rights Reserved.
#
# Copyright (c) 1992 by Sun Microsystems
#
#

#ident	"@(#)preremove	1.10	07 Jul 1994	SMI"

#
# Return pid of named process in variable "pid"
#
pidproc() {
    pid=`/usr/bin/ps -e |
        /usr/bin/grep $1 |
        /usr/bin/sed -e 's/^  *//' -e 's/ .*//'`
}

#
# kill a proc 
#
killproc() {
	pidproc $1
	[ "$pid" != "" ] && kill -15 $pid
}

#
# kill any of the agents if they are running
#
killproc na.snmp

exit 0
