@cryptotaxi247 / netdata-1 / commits / 87aa191ca

megacli: search binary and sudo check fix (#7108)

* search for MegaCli binary too * use `sudo -n -l` instead of `sudo -n -v` for sudo check

Ilya Mashchenko committed Oct 16, 2019 at 10:44 UTC 87aa191cab51d43ba586d86cb3bed13b14479f56
1 file changed +2 -2
collectors/python.d.plugin/megacli/megacli.chart.py
+2 -2
@@ -163,8 +163,8 @@ class Battery:
163 class Megacli:
164 def __init__(self):
165 self.s = find_binary('sudo')
166 - self.m = find_binary('megacli')
167 - self.sudo_check = [self.s, '-n', '-v']
166 + self.m = find_binary('megacli') or find_binary('MegaCli') # Binary on FreeBSD is MegaCli
167 + self.sudo_check = [self.s, '-n', '-l']
168 self.disk_info = [self.s, '-n', self.m, '-LDPDInfo', '-aAll', '-NoLog']
169 self.battery_info = [self.s, '-n', self.m, '-AdpBbuCmd', '-a0', '-NoLog']
170