1
0
Fork 0

plugin_mounts: not hardcoded lsblk path, it may differ accross distros

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This commit is contained in:
Jaroslav Škarvada 2016-07-15 15:56:36 +02:00
parent e675ab0b4c
commit 98c9a1f537

View file

@ -23,7 +23,7 @@ class MountsPlugin(base.Plugin):
mountpoint_topology = {}
current_disk = None
stdout, stderr = Popen(["/usr/bin/lsblk", "-rno", "TYPE,RM,KNAME,FSTYPE,MOUNTPOINT"], stdout=PIPE, stderr=PIPE, close_fds=True).communicate()
stdout, stderr = Popen(["lsblk", "-rno", "TYPE,RM,KNAME,FSTYPE,MOUNTPOINT"], stdout=PIPE, stderr=PIPE, close_fds=True).communicate()
for columns in map(lambda line: line.split(), stdout.splitlines()):
if len(columns) < 3:
continue