~adam-stokes/sosreport/sosreport-git

« back to all changes in this revision

Viewing changes to sos/plugins/block.py

  • Committer: Adam 'stokachu' Stokes
  • Date: 2013-05-10 00:05:38 UTC
  • Revision ID: adam.stokes@ubuntu.com-20130510000538-xbzrwjo3i3tvwblr
mergeĀ fromĀ upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
    plugin_name = 'block'
23
23
 
24
24
    def setup(self):
25
 
        # legacy location for non-/run distributions
26
 
        self.add_copy_spec("/etc/blkid.tab")
27
 
        self.add_copy_spec("/run/blkid/blkid.tab")
 
25
        self.add_copy_spec("/proc/partitions")
 
26
        
28
27
        self.add_cmd_output("lsblk")
29
28
        self.add_cmd_output("blkid -c /dev/null")
30
29
        self.add_cmd_output("ls -lanR /dev")
31
30
        self.add_cmd_output("ls -lanR /sys/block")
32
31
 
 
32
        # legacy location for non-/run distributions
 
33
        self.add_copy_spec("/etc/blkid.tab")
 
34
        self.add_copy_spec("/run/blkid/blkid.tab")
 
35
 
33
36
        if os.path.isdir("/sys/block"):
34
37
            for disk in os.listdir("/sys/block"):
35
38
                if disk in [ ".",  ".." ] or disk.startswith("ram"):