File: apport-hook.py

package info (click to toggle)
virtualbox 5.1.8-dfsg-7~bpo8%2B1
  • links: PTS, VCS
  • area: contrib
  • in suites: jessie-backports
  • size: 359,624 kB
file content (11 lines) | stat: -rw-r--r-- 553 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
import apport.hookutils

def add_info(report):
    """Add a list of installed packages matching 'virtualbox' or 'linux-headers'"""
    report['VirtualBox.DpkgList'] = apport.hookutils.command_output(["sh", "-c", "dpkg -l | grep -e virtualbox -e linux-headers"])

    """Add information about installed VirtualBox kernel modules"""
    report['VirtualBox.ModInfo'] = apport.hookutils.command_output(["sh", "-c",
        "find /lib/modules/`uname -r` -name \"vbox*\" | xargs -r modinfo"])

    report['LsMod'] = apport.hookutils.command_output(["lsmod"])