File: postinst

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 (20 lines) | stat: -rwxr-xr-x 393 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
#!/bin/sh

#
# append the control line to activate our trap handler
#
SNMPTRAPDCONF=/etc/snmp/snmptrapd.conf
DEFLINE="traphandle default /usr/sbin/snmptrapfmthdlr"

/bin/grep -qs "${DEFLINE}" ${SNMPTRAPDCONF}
if [ $? -eq 1 ]; then
  # line not there, append it
    echo "${DEFLINE}"  >> ${SNMPTRAPDCONF}

  #
  # restart the snmpd and snmptrapd
  #
  /etc/init.d/snmpd restart
fi

#DEBHELPER#