#!/bin/sh

#
# remove the activation line for our trap handler
#
SNMPTRAPDCONF=/etc/snmp/snmptrapd.conf
DEFLINE="traphandle default /usr/sbin/snmptrapfmthdlr"
TMPFILE=`tempfile`

if [ -r ${SNMPTRAPDCONF} ]; then
  /bin/grep -v "${DEFLINE}" ${SNMPTRAPDCONF} >${TMPFILE}
  /bin/cp ${TMPFILE} ${SNMPTRAPDCONF}
  /bin/rm -f ${TMPFILE}

  #
  # now restart the snmpd again
  #
  /etc/init.d/snmpd restart
fi
