File: prerm

package info (click to toggle)
snmptrapfmt 1.11
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 136 kB
  • ctags: 88
  • sloc: ansic: 1,330; sh: 90; makefile: 27
file content (21 lines) | stat: -rwxr-xr-x 416 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/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

#DEBHELPER#