3
'''apport hook for net-snmp
5
(c) 2010 Andres Rodriguez
6
Author: Andres Rodriguez <andreserl@ubuntu.com>
8
This program is free software; you can redistribute it and/or modify it
9
under the terms of the GNU General Public License as published by the
10
Free Software Foundation; either version 2 of the License, or (at your
11
option) any later version. See http://www.gnu.org/copyleft/gpl.html for
12
the full text of the license.
15
from apport.hookutils import *
18
def add_info(report, ui):
19
response = ui.yesno("The contents of your /etc/snmp/snmpd.conf and "
20
"your /etc/snmp/snmptrapd.conf files may help "
21
"developers diagnose your bug more quickly. "
22
"However, it may contain sensitive information. "
23
"Do you want to include it in your bug report?")
25
if response == None: # user cancelled
28
elif response == True:
29
attach_conffiles(report, 'snmpd')
32
report['SNMPVersion'] = root_command_output(['/usr/sbin/snmpd', '-v'])
35
report['SyslogSnmpd'] = recent_syslog(re.compile('snmpd\['))
36
report['SyslogSnmptrapd'] = recent_syslog(re.compile('snmptrapd\['))